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 <dariusmih...@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));
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to