svn commit: r345170 - head/usr.sbin/bhyve
Chuck Tuffli
chuck at FreeBSD.org
Fri Mar 15 02:11:28 UTC 2019
Author: chuck
Date: Fri Mar 15 02:11:27 2019
New Revision: 345170
URL: https://svnweb.freebsd.org/changeset/base/345170
Log:
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
Modified:
head/usr.sbin/bhyve/pci_nvme.c
Modified: head/usr.sbin/bhyve/pci_nvme.c
==============================================================================
--- head/usr.sbin/bhyve/pci_nvme.c Fri Mar 15 01:26:10 2019 (r345169)
+++ head/usr.sbin/bhyve/pci_nvme.c Fri Mar 15 02:11:27 2019 (r345170)
@@ -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;
More information about the svn-src-head
mailing list