diff options
author | Tom Rini <trini@konsulko.com> | 2018-11-23 17:25:27 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-23 17:25:27 -0500 |
commit | 5830791d91d1200854ef78fcb32f808c8080f0f0 (patch) | |
tree | c9ec3c59244371d8ad9992a2ba332a7b50d33950 /drivers/pci | |
parent | a3e1653ddeb02f39481eba572275016171e9670c (diff) | |
parent | a58986ca8b53d8c7a441397082f84edc7f47d19f (diff) |
Merge tag 'pull-tg18' of git://git.denx.de/u-boot-dm
Various minor sandbox improvements
Better buildman warning handling
Misc other things
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-uclass.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 0c52337f33..2cf55cb743 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -774,16 +774,19 @@ int pci_bind_bus_devices(struct udevice *bus) found_multi = false; if (PCI_FUNC(bdf) && !found_multi) continue; + /* Check only the first access, we don't expect problems */ - ret = pci_bus_read_config(bus, bdf, PCI_HEADER_TYPE, - &header_type, PCI_SIZE_8); + ret = pci_bus_read_config(bus, bdf, PCI_VENDOR_ID, &vendor, + PCI_SIZE_16); if (ret) goto error; - pci_bus_read_config(bus, bdf, PCI_VENDOR_ID, &vendor, - PCI_SIZE_16); + if (vendor == 0xffff || vendor == 0x0000) continue; + pci_bus_read_config(bus, bdf, PCI_HEADER_TYPE, + &header_type, PCI_SIZE_8); + if (!PCI_FUNC(bdf)) found_multi = header_type & 0x80; |