svn commit: r337886 - head/usr.sbin/bhyve

Marcelo Araujo araujo at FreeBSD.org
Thu Aug 16 06:20:26 UTC 2018


Author: araujo
Date: Thu Aug 16 06:20:25 2018
New Revision: 337886
URL: https://svnweb.freebsd.org/changeset/base/337886

Log:
  Increase the mask from 15 to 255 or otherwise NVME_FEAT_SOFTWARE_PROGRESS
  will never be reached.
  
  Discussed with:	Leon Dang and Darius Mihai <dariusmihaim at gmail.com>
  MFC after:	1 week.
  Sponsored by:	iXsystems Inc.

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==============================================================================
--- head/usr.sbin/bhyve/pci_nvme.c	Thu Aug 16 01:27:16 2018	(r337885)
+++ head/usr.sbin/bhyve/pci_nvme.c	Thu Aug 16 06:20:25 2018	(r337886)
@@ -653,7 +653,7 @@ static int
 nvme_opc_set_features(struct pci_nvme_softc* sc, struct nvme_command* command,
 	struct nvme_completion* compl)
 {
-	int feature = command->cdw10 & 0x0F;
+	int feature = command->cdw10 & 0xFF;
 	uint32_t iv;
 
 	DPRINTF(("%s feature 0x%x\r\n", __func__, feature));
@@ -748,7 +748,7 @@ static int
 nvme_opc_get_features(struct pci_nvme_softc* sc, struct nvme_command* command,
 	struct nvme_completion* compl)
 {
-	int feature = command->cdw10 & 0x0F;
+	int feature = command->cdw10 & 0xFF;
 
 	DPRINTF(("%s feature 0x%x\r\n", __func__, feature));
 


More information about the svn-src-head mailing list