aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorChuck Tuffli <chuck@FreeBSD.org>2019-03-15 02:11:27 +0000
committerChuck Tuffli <chuck@FreeBSD.org>2019-03-15 02:11:27 +0000
commit7bb1073842e8a1943d8b48cb1e4e07215b4c5be1 (patch)
tree927de20fd4fb3dd96cce4ed443aa51580041c245 /usr.sbin
parentee072597f3f4b584da5ad172cf01c8cc0a4accf2 (diff)
downloadsrc-7bb1073842e8a1943d8b48cb1e4e07215b4c5be1.tar.gz
src-7bb1073842e8a1943d8b48cb1e4e07215b4c5be1.zip
Fix bhyve's NVMe Identify Namespace data
The NVMe Identify Namespace data structure's Number of LBA Formats (NLBAF) field is a 0's based value (i.e. 0x0 means 1). Since the emulation only supports a single format, set NLBAF to 0x0, not 1. Reviewed by: imp, araujo, rgrimes Approved by: imp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19579
Notes
Notes: svn path=/head/; revision=345170
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/pci_nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
index 5a8ab086d1e9..8fe8d1b25df3 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -358,7 +358,7 @@ pci_nvme_init_nsdata(struct pci_nvme_softc *sc)
nd->nuse = nd->nsze;
/* Get LBA and backstore information from backing store */
- nd->nlbaf = 1;
+ nd->nlbaf = 0; /* NLBAF is a 0's based value (i.e. 1 LBA Format) */
/* LBA data-sz = 2^lbads */
nd->lbaf[0] = sc->nvstore.sectsz_bits << NVME_NS_DATA_LBAF_LBADS_SHIFT;