diff options
author | Gabe Black <gabeblack@google.com> | 2012-11-21 01:52:27 -0800 |
---|---|---|
committer | Anton Kochkov <anton.kochkov@gmail.com> | 2013-02-26 07:39:06 +0100 |
commit | 37ef52d44b3d527d6a4fb84eaffa4260b7521d4a (patch) | |
tree | be0598e4a7c22860cef3e675a43f927ab694e6b3 /payloads/libpayload | |
parent | b4523bb691037f78a0823299ef44c0e350e17759 (diff) | |
download | coreboot-37ef52d44b3d527d6a4fb84eaffa4260b7521d4a.tar.xz |
libpayload: Correct a constant used for scanning for USB controllers.
When checking to see if a PCI device exists at a particular bus/dev/func,
libpayload was checking the vendor and device id fields together against a 16
bit 0xffff. The two fields together are 32 bits, however, so the check was
never true, and all dev/func combinations on a particular bus would be
checked. That was slightly wasteful, but had relatively small impact.
Change-Id: Iad537295c33083243940b18e7a99af92857e1ef2
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2521
Tested-by: build bot (Jenkins)
Reviewed-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/drivers/usb/usbinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/usbinit.c b/payloads/libpayload/drivers/usb/usbinit.c index 2e466d307d..74358bb20f 100644 --- a/payloads/libpayload/drivers/usb/usbinit.c +++ b/payloads/libpayload/drivers/usb/usbinit.c @@ -123,7 +123,7 @@ static void usb_scan_pci_bus(int bus) u8 header_type; pcidev_t addr = PCI_DEV(bus, dev, 0); /* Check if there's a device here at all. */ - if (pci_read_config32(addr, REG_VENDOR_ID) == 0xffff) + if (pci_read_config32(addr, REG_VENDOR_ID) == 0xffffffff) continue; header_type = pci_read_config8(addr, REG_HEADER_TYPE); /* If this is a bridge, scan the bus on the other side. */ |