All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH u-boot] pci: ensure enumeration of all devices in pci_init
Date: Tue, 21 May 2019 13:43:54 +0200	[thread overview]
Message-ID: <7ea36d56-9928-e355-c687-81de55699106@denx.de> (raw)
In-Reply-To: <20190521100431.10532-1-marek.behun@nic.cz>

(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 <marek.behun@nic.cz>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Anton Schubert <anton.schubert@gmx.de>
> Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
> Cc: Mario Six <mario.six@gdsys.cc>
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Phil Sutter <phil@nwl.cc>
> Cc: VlaoMao <vlaomao@gmail.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>   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 <sr@denx.de>

BTW: With this patch now, this one is obsolete?

http://patchwork.ozlabs.org/patch/1099538/

Thanks,
Stefan

  reply	other threads:[~2019-05-21 11:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 10:04 [U-Boot] [PATCH u-boot] pci: ensure enumeration of all devices in pci_init Marek Behún
2019-05-21 11:43 ` Stefan Roese [this message]
2019-05-22 10:39   ` Marek Behún
2019-05-21 14:07 ` Bin Meng
2019-07-14 13:06 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ea36d56-9928-e355-c687-81de55699106@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.