git: dcdb43f28fac - stable/13 - bhyve nvme: Fix firmware read only initialization
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Nov 2022 17:55:25 UTC
The branch stable/13 has been updated by chuck:
URL: https://cgit.FreeBSD.org/src/commit/?id=dcdb43f28fac9b3885601811e44401bbac6db517
commit dcdb43f28fac9b3885601811e44401bbac6db517
Author: Wanpeng Qian <wanpengqian@gmail.com>
AuthorDate: 2022-08-14 15:30:06 +0000
Commit: Chuck Tuffli <chuck@FreeBSD.org>
CommitDate: 2022-11-20 01:54:04 +0000
bhyve nvme: Fix firmware read only initialization
Summary:
Code was using the mask value without the shift.
Test Plan: Within FreeBSD/Linux guest, Identify NVMe controller to check the result.
(cherry picked from commit 9f678cfcb42d1d0ce3898b0e38bb147a3e14834a)
---
usr.sbin/bhyve/pci_nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
index 4b0920860e5b..9a465f3b1910 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -545,7 +545,7 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
cd->aerl = 4;
/* Advertise 1, Read-only firmware slot */
- cd->frmw = NVME_CTRLR_DATA_FRMW_SLOT1_RO_MASK |
+ cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) |
(1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT);
cd->lpa = 0; /* TODO: support some simple things like SMART */
cd->elpe = 0; /* max error log page entries */