From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 21 May 2019 13:43:54 +0200 Subject: [U-Boot] [PATCH u-boot] pci: ensure enumeration of all devices in pci_init In-Reply-To: <20190521100431.10532-1-marek.behun@nic.cz> References: <20190521100431.10532-1-marek.behun@nic.cz> Message-ID: <7ea36d56-9928-e355-c687-81de55699106@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de (Added Simon & Bin to Cc) On 21.05.19 12:04, Marek BehĂșn wrote: > 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 > --- > drivers/pci/pci-uclass.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c > index cf1e7617ae..dac7cd3e17 100644 > --- a/drivers/pci/pci-uclass.c > +++ b/drivers/pci/pci-uclass.c > @@ -1502,9 +1502,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)) { > ; > } > } > Reviewed-by: Stefan Roese BTW: With this patch now, this one is obsolete? http://patchwork.ozlabs.org/patch/1099538/ Thanks, Stefan