summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek BehĂșn <[email protected]>2019-05-21 12:04:31 +0200
committerTom Rini <[email protected]>2019-07-12 21:07:58 -0400
commit60ee60944bd80c76939e90b8a39430e05b9059a8 (patch)
tree38ad516d6e3e053e275edc6dc9df2cc030cacfb6
parent26eff4573747050518863b5c8ba777dc0202d7c3 (diff)
pci: ensure enumeration of all devices in pci_init
Use the uclass_first_device_check and uclass_next_device_check functions instead of uclass_first_device and uclass_next_device in pci_init. This ensures that all PCI devices are tried to be probed. Currently if a device fails to probe, the enumeration stops and the devices which come after the failed device are not probed. Signed-off-by: Marek BehĂșn <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Anton Schubert <[email protected]> Cc: Dirk Eibach <[email protected]> Cc: Mario Six <[email protected]> Cc: Chris Packham <[email protected]> Cc: Phil Sutter <[email protected]> Cc: VlaoMao <[email protected]> Cc: Tom Rini <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Bin Meng <[email protected]>
-rw-r--r--drivers/pci/pci-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index c74ebf6a763..ab3e1310eb5 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -1572,9 +1572,9 @@ void pci_init(void)
* Enumerate all known controller devices. Enumeration has the side-
* effect of probing them, so PCIe devices will be enumerated too.
*/
- for (uclass_first_device(UCLASS_PCI, &bus);
+ for (uclass_first_device_check(UCLASS_PCI, &bus);
bus;
- uclass_next_device(&bus)) {
+ uclass_next_device_check(&bus)) {
;
}
}