Bug 220267 - [patch] NVMe kernel driver should use 32-bit NSID
Summary: [patch] NVMe kernel driver should use 32-bit NSID
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-scsi (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-06-25 18:50 UTC by chuck
Modified: 2017-08-31 16:46 UTC (History)
3 users (show)

See Also:


Attachments
patch to convert all instances of nsid to uint32_t (4.47 KB, patch)
2017-06-25 18:50 UTC, chuck
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chuck 2017-06-25 18:50:55 UTC
Created attachment 183787 [details]
patch to convert all instances of nsid to uint32_t

Several places passed in the NVMe Namespace ID (nsid) as a
16 bit value, but the specification defines this as a 32-bit
value. Note other places in the driver correctly specify the
nsid as 32 bits.

Signed-off-by: Chuck Tuffli <chuck@tuffli.net>
Comment 1 chuck 2017-08-29 15:35:32 UTC
@imp fixed this with r322902
Comment 2 Warner Losh freebsd_committer freebsd_triage 2017-08-29 15:41:50 UTC
Except I didn't completely. Chuck had a few things in his patch I missed, which I'll commit now.

Didn't recall this bug, but it would explain why I couldn't seem to find this when I went to phab and looked when I had a vague feeling I'd seen this before...
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-08-29 15:47:05 UTC
A commit references this bug:

Author: imp
Date: Tue Aug 29 15:46:34 UTC 2017
New revision: 322998
URL: https://svnweb.freebsd.org/changeset/base/322998

Log:
  Fix a few overlooked spots where the coded uses 16-bit NSIDs. Chuck
  Tuffli had submitted a more thorough patch that I was unaware of when
  I did my work and this brings in the bits I missed from that patch.

  PR: 220267
  Submitted by: Chuck Tuffli

Changes:
  head/sys/cam/cam_ccb.h
  head/sys/dev/nvme/nvme.h
Comment 4 Ed Maste freebsd_committer freebsd_triage 2017-08-31 16:46:24 UTC
Will we MFC this to stable/11?