summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2022-04-28 18:31:48 +0200
committerNico Huber <nico.h@gmx.de>2022-05-11 12:15:11 +0000
commit88b041897f382d07a3fdc109dcb87cfc5152b9fe (patch)
treec8daa667dc1d48b37190cfb42747ccb300ccfb94 /payloads/libpayload
parent2b986700c95cd1d49f982aa17fa9da713c2ecfef (diff)
libpayload/nvme: Test for NVMe-command-set bit individually
We only need to know if the NVMe command set is supported. Other command-set bits can be set too, but we don't have to care. Fixes init in QEMU which has more command-set bits set by now. Change-Id: I29a693cf8cc13775e94dc671e8d0412ad86fef9c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63934 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/drivers/storage/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/storage/nvme.c b/payloads/libpayload/drivers/storage/nvme.c
index 14174cfd83..7bcb05dec1 100644
--- a/payloads/libpayload/drivers/storage/nvme.c
+++ b/payloads/libpayload/drivers/storage/nvme.c
@@ -321,7 +321,7 @@ static void nvme_init(pcidev_t dev)
void *pci_bar0 = phys_to_virt(pci_read_config32(dev, 0x10) & ~0x3ff);
- if (!(((read64(pci_bar0) >> 37) & 0xff) == 0x01)) {
+ if (!(read64(pci_bar0) >> 37 & 0x01)) {
printf("NVMe ERROR: PCIe device does not support the NVMe command set\n");
return;
}