Bug 220267

Summary: [patch] NVMe kernel driver should use 32-bit NSID
Product: Base System Reporter: chuck
Component: kernAssignee: freebsd-scsi (Nobody) <scsi>
Status: Closed FIXED    
Severity: Affects Only Me CC: cem, emaste, imp
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch to convert all instances of nsid to uint32_t none

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?