bhyve: return FEATURE_NOT_CHANGEABLE for unimplemented feature of NVMe controller
Set Feature is a feature specified function. Currently only some features have the set procedure. For features that are not handled by the controller, we should return a FEATURE_NOT_CHANGEABLE error message. Approved by: manu (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32802
This commit is contained in:
parent
8ab99dbea1
commit
05a21658eb
@ -1885,6 +1885,11 @@ nvme_opc_set_features(struct pci_nvme_softc *sc, struct nvme_command *command,
|
||||
|
||||
if (feat->set)
|
||||
feat->set(sc, feat, command, compl);
|
||||
else {
|
||||
pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC,
|
||||
NVME_SC_FEATURE_NOT_CHANGEABLE);
|
||||
return (1);
|
||||
}
|
||||
|
||||
DPRINTF("%s: status=%#x cdw11=%#x", __func__, compl->status, command->cdw11);
|
||||
if (compl->status == NVME_SC_SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user