From: Marek BehĂșn Date: Tue, 21 May 2019 10:04:31 +0000 (+0200) Subject: pci: ensure enumeration of all devices in pci_init X-Git-Tag: v2019.10-rc1~31^2~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=60ee60944bd80c76939e90b8a39430e05b9059a8;p=oweals%2Fu-boot.git 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 Cc: Stefan Roese Cc: Anton Schubert Cc: Dirk Eibach Cc: Mario Six Cc: Chris Packham Cc: Phil Sutter Cc: VlaoMao Cc: Tom Rini Reviewed-by: Stefan Roese Reviewed-by: Bin Meng --- diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index c74ebf6a76..ab3e1310eb 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)) { ; } }