Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2018 06:20:25 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337886 - head/usr.sbin/bhyve
Message-ID:  <201808160620.w7G6KP9M059346@repo.freebsd.org>

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



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