diff options
author | Mara Sophie Grosch via groups.io <littlefox=lf-net.org@groups.io> | 2022-03-23 18:22:33 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-03-25 00:59:04 +0000 |
commit | 5d8d8b514832fcaa36c0b573b51442c2f53e2aaf (patch) | |
tree | 5662791d8f6510f0df69b9299bb94120c36a1828 /MdeModulePkg | |
parent | ec0b54849b23efa25caf0055b0eef8bf9b4dec98 (diff) | |
download | edk2-5d8d8b514832fcaa36c0b573b51442c2f53e2aaf.tar.gz |
MdeModulePkg/NvmExpressDxe: fix check for Cap.Css
Fix the check for NVMe command set being supported by the controller.
Was problematic with qemu (6.2.0, Debian 1:6.2+dfsg-3), which sets 0xC1
in that register, making the OVMF think the NVMe controller does not
support NVMe.
Uncovered by commit 9dd14fc91c174eae87fd122c7ac70073a363527f, which
changed the number of bits included in the Css register from 4 to 8.
Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index d87212ffb2..b90c48731c 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -761,7 +761,7 @@ NvmeControllerInit ( return Status;
}
- if (Private->Cap.Css != 0x01) {
+ if ((Private->Cap.Css & BIT0) == 0) {
DEBUG ((DEBUG_INFO, "NvmeControllerInit: the controller doesn't support NVMe command set\n"));
return EFI_UNSUPPORTED;
}
|