diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-15 07:50:59 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-15 07:50:59 -0400 |
commit | 2d34be0a9e12cf050de39ad95375213f48e685bd (patch) | |
tree | eec9902ce120d15c0868a9024e2c9e4adc947132 /drivers/pci/pci-uclass.c | |
parent | 10cd8efe1a7eacd63907ba95bd8442bc2cdce461 (diff) | |
parent | 35b2b5f04c71efb73ec0f1a01535542e4b602e15 (diff) |
Merge branch '2021-10-14-assorted-updates'
- Update to LLVM-13 in CI, assorted PCI fixes and pytest in CI
improvements
Diffstat (limited to 'drivers/pci/pci-uclass.c')
-rw-r--r-- | drivers/pci/pci-uclass.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 044babee164..5da3515f5f2 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -627,6 +627,7 @@ int pci_generic_mmap_read_config( int dm_pci_hose_probe_bus(struct udevice *bus) { + u8 header_type; int sub_bus; int ret; int ea_pos; @@ -634,6 +635,14 @@ int dm_pci_hose_probe_bus(struct udevice *bus) debug("%s\n", __func__); + dm_pci_read_config8(bus, PCI_HEADER_TYPE, &header_type); + header_type &= 0x7f; + if (header_type != PCI_HEADER_TYPE_BRIDGE) { + debug("%s: Skipping PCI device %d with Non-Bridge Header Type 0x%x\n", + __func__, PCI_DEV(dm_pci_get_bdf(bus)), header_type); + return log_msg_ret("probe", -EINVAL); + } + ea_pos = dm_pci_find_capability(bus, PCI_CAP_ID_EA); if (ea_pos) { dm_pci_read_config8(bus, ea_pos + sizeof(u32) + sizeof(u8), |