Re: [U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots

2019-05-16 Thread Marek Behún
Hi Mario, you are right. I shall send a new patch chaning pci_init to use the _check functions after I test it. Marek On Wed, 15 May 2019 07:05:43 +0200 Mario Six wrote: > Hi Marek, > > On Tue, May 14, 2019 at 5:12 PM Marek Behún > wrote: > > > > The documentation for the uclass_next_device sa

Re: [U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots

2019-05-14 Thread Mario Six
Hi Marek, On Tue, May 14, 2019 at 5:12 PM Marek Behún wrote: > > The documentation for the uclass_next_device says this: > > @devp: On entry, pointer to device to lookup. On exit, returns pointer > to the next device in the uclass if no error occurred, or NULL if > there is no next device,

Re: [U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots

2019-05-14 Thread Marek Behún
The documentation for the uclass_next_device says this: @devp: On entry, pointer to device to lookup. On exit, returns pointer to the next device in the uclass if no error occurred, or NULL if there is no next device, or an error occurred with that next device. But this is useless, because

Re: [U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots

2019-05-14 Thread Marek Behún
On Tue, 14 May 2019 16:58:59 +0200 Marek Behún wrote: > The ofdata_to_platdata method for this driver returns -ENODEV if link > is down for a given bus, for example if there is no device in the > slot. This causes the uclass_{first,next}_device to return NULL for > this bus in pci-uclass.c:pci_in

[U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots

2019-05-14 Thread Marek Behún
The ofdata_to_platdata method for this driver returns -ENODEV if link is down for a given bus, for example if there is no device in the slot. This causes the uclass_{first,next}_device to return NULL for this bus in pci-uclass.c:pci_init, which of course stops probing of buses which come after. So