Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: willy@linux.intel.com (Matthew Wilcox)
Subject: [PATCH] NVMe: Update SCSI Inquiry VPD 83 translation
Date: Tue, 2 Dec 2014 16:36:07 -0500	[thread overview]
Message-ID: <20141202213607.GY11522@wil.cx> (raw)
In-Reply-To: <alpine.LNX.2.00.1412022059180.4225@localhost.lm.intel.com>

On Tue, Dec 02, 2014@09:13:30PM +0000, Keith Busch wrote:
> On Tue, 2 Dec 2014, Matthew Wilcox wrote:
> >On Tue, Dec 02, 2014@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))
> >
> >What do you think?
> 
> I didn't even know what a 1.1 revision was supposed to look like until
> 1.2 clarified that, so a macro to hide the weirdness sounds good.

That was actually fixed in 1.1b ... but, yeah, there was argument within
the committee about exactly what a version number was, whether 1.12 was
greater or less than 1.2, and how we encoded versions.  I was adamant
that no matter what we settled on, the simple comparison had to work;
parsing the version to determine whether it was an earlier or later
version of the spec was not acceptable.

  reply	other threads:[~2014-12-02 21:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 19:56 [PATCH] NVMe: Update SCSI Inquiry VPD 83 translation Keith Busch
2014-12-02 20:50 ` Matthew Wilcox
2014-12-02 21:13   ` Keith Busch
2014-12-02 21:36     ` Matthew Wilcox [this message]
     [not found]   ` <CANvN+emyvT5MEsyOmY2XG=4j4Yq+Hp93oEtyXbooGp9qJWNfTw@mail.gmail.com>
2014-12-02 21:32     ` Matthew Wilcox
2014-12-03 11:41   ` Zakaria Abushima (zabushima)
2014-12-03 17:36     ` James R. Bergsten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141202213607.GY11522@wil.cx \
    --to=willy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox