git: 9f678cfcb42d - main - bhyve nvme: Fix firmware read only initialization
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Aug 2022 18:18:30 UTC
The branch main has been updated by chuck:
URL: https://cgit.FreeBSD.org/src/commit/?id=9f678cfcb42d1d0ce3898b0e38bb147a3e14834a
commit 9f678cfcb42d1d0ce3898b0e38bb147a3e14834a
Author: Wanpeng Qian <wanpengqian@gmail.com>
AuthorDate: 2022-08-14 15:30:06 +0000
Commit: Chuck Tuffli <chuck@FreeBSD.org>
CommitDate: 2022-08-14 16:59:36 +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.
Reviewed by: chuck, imp
MFC after: 2 weeks
Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Differential Revision: https://reviews.freebsd.org/D32659
---
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 afb5327ecd20..70ae22c71a37 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -546,7 +546,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 */