Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2019 02:11:27 +0000 (UTC)
From:      Chuck Tuffli <chuck@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345170 - head/usr.sbin/bhyve
Message-ID:  <201903150211.x2F2BRPh079855@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903150211.x2F2BRPh079855>