[PATCH 04/11] nvme: remove the unused dma_addr_t arguments to nvme_{get, set}_features

Matthew Wilcox willy at linux.intel.com
Mon May 11 06:54:25 PDT 2015


On Sat, May 09, 2015 at 05:53:22PM +0200, Christoph Hellwig wrote:
> On Fri, May 08, 2015 at 03:03:51PM -0400, Matthew Wilcox wrote:
> > >  int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
> > > -					dma_addr_t dma_addr, u32 *result)
> > > +		u32 *result)
> > >  {
> > >  	struct nvme_command c;
> > >  
> > >  	memset(&c, 0, sizeof(c));
> > >  	c.features.opcode = nvme_admin_get_features;
> > >  	c.features.nsid = cpu_to_le32(nsid);
> > > -	c.features.prp1 = cpu_to_le64(dma_addr);
> > >  	c.features.fid = cpu_to_le32(fid);
> > >  
> > >  	return __nvme_submit_sync_cmd(dev->admin_q, &c, result, 0);
> > 
> > Wait, what?  The PRP1 field is used for LBA Range Type and Autonomous
> > Power State Transitions.
> 
> None of which is, or ever was issued by the Linux driver.

Not true.

                res = nvme_get_features(dev, NVME_FEAT_LBA_RANGE, i,
                                                        dma_addr + 4096, NULL);

Looks like it was (inadvertently?) deleted in February by Keith's patch to
add metadata support.  Keith?




More information about the Linux-nvme mailing list