Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46424 )
Change subject: libpayload/storage/ahci: Read device class from pcidev struct ......................................................................
libpayload/storage/ahci: Read device class from pcidev struct
Read device class from pcidev struct
Change-Id: I2d5673c631d978d8ebd0c4a90962ab9cccaf40a2 Signed-off-by: Felix Singer felixsinger@posteo.net --- M payloads/libpayload/drivers/storage/ahci.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/46424/1
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c index e54bfbf..be54686 100644 --- a/payloads/libpayload/drivers/storage/ahci.c +++ b/payloads/libpayload/drivers/storage/ahci.c @@ -232,9 +232,9 @@ { int i;
- const u16 class = pci_read_config16(dev, 0xa); - if (class != 0x0106) + if (dev->device_class != PCI_CLASS_STORAGE_AHCI) return; + const u16 vendor = pci_read_config16(dev, 0x00); const u16 device = pci_read_config16(dev, 0x02);