[PATCH] NVMe: Update SCSI Inquiry VPD 83 translation

Matthew Wilcox willy at linux.intel.com
Tue Dec 2 13:32:44 PST 2014


On Tue, Dec 02, 2014 at 11:57:50PM +0300, Andrey Kuzmin wrote:
> On Dec 2, 2014 11:51 PM, "Matthew Wilcox" <willy at linux.intel.com> wrote:
> >
> > On Tue, Dec 02, 2014 at 12:56:16PM -0700, Keith Busch wrote:
> > > +     if (readl(&dev->bar->vs) >= 0x10100) {
> >
> > I think we want an NVME_VERSION() macro that maybe looks something like
> this:
> >
> > #define NVME_VERSION(major, minor) (((major) << 16) | ((minor) << 8))
> >
> > Then you can make this:
> >
> >         if (readl(&dev->bar->vs) >= NVME_VERSION(1, 1))
> 
> Adding #define for NVME_VERSION_MAJOR/MINOR would make it easier to
> maintain than (1,1).

I don't quite understand what you're arguing for.  Could you demonstrate?



More information about the Linux-nvme mailing list