bhyve nvme: Fix reported SANICAP value

The NVMe specification only allows Controllers compliant with the
revision 1.3 and earlier specification to report a value of 0x0 in the
No-Deallocate Modifies Media After Sanitize (NODMMAS) field.

For our revision 1.4 Controller, report that media is not modified after
Sanitize as the implementation does not implement Sanitize.

Fixes UNH Test 1.1.2

Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36192
This commit is contained in:
Chuck Tuffli 2022-08-16 09:14:43 -07:00
parent 0726cde8ea
commit ec0efe34dd

View File

@ -560,6 +560,10 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
cd->wctemp = 0x0157;
cd->cctemp = 0x0157;
/* SANICAP must not be 0 for Revision 1.4 and later NVMe Controllers */
cd->sanicap = (NVME_CTRLR_DATA_SANICAP_NODMMAS_NO <<
NVME_CTRLR_DATA_SANICAP_NODMMAS_SHIFT);
cd->sqes = (6 << NVME_CTRLR_DATA_SQES_MAX_SHIFT) |
(6 << NVME_CTRLR_DATA_SQES_MIN_SHIFT);
cd->cqes = (4 << NVME_CTRLR_DATA_CQES_MAX_SHIFT) |