U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: Caleb Connolly <caleb.connolly@linaro.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>,
	Dragan Simic <dsimic@manjaro.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Nam Cao <namcao@linutronix.de>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Tony Dinh <mibodhi@gmail.com>
Subject: Re: [PATCH v2 31/39] Revert "bootdev: avoid infinite probe loop"
Date: Wed, 7 Aug 2024 03:27:20 +0200	[thread overview]
Message-ID: <1fbea795-45b2-4226-8eec-50647ce06d32@gmx.de> (raw)
In-Reply-To: <20240806125850.2316956-32-sjg@chromium.org>

On 06.08.24 14:58, Simon Glass wrote:
> This turns out to be insufficient to fix the problem, since when
> bootdev_next_prio() exits, the caller has no idea that this really
> is the end. Nor is it, since there may be other devices which should
> be checked.

Please, describe how the original problem will be addressed.

@Caleb:

Do you have instruction how to reproduce the problem?

>
> The caller iterates which calls iter_incr() which calls
> bootdev_next_prio() again, which finds the same device and the loop
> continues.
>
> We never did create a test for this[1], which makes it hard to be
> sure which problem was fixed.
>
> The original code had the virtual of staying in the loop looking for

%s/virtual/virtue/

Best regards

Heinrich

> a bootdev, so let's go back to that and try to fix this another way.
>
> This reverts commit 9d92c418acfb7576e12e2bd53fed294bb9543724.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
>   boot/bootdev-uclass.c | 14 ++------------
>   1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
> index 7c7bba088c9..15a8a3555c6 100644
> --- a/boot/bootdev-uclass.c
> +++ b/boot/bootdev-uclass.c
> @@ -632,7 +632,7 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp,
>
>   int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp)
>   {
> -	struct udevice *dev = *devp, *last_dev = NULL;
> +	struct udevice *dev = *devp;
>   	bool found;
>   	int ret;
>
> @@ -682,19 +682,9 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp)
>   			}
>   		} else {
>   			ret = device_probe(dev);
> -			if (!ret)
> -				last_dev = dev;
>   			if (ret) {
> -				log_warning("Device '%s' failed to probe\n",
> +				log_debug("Device '%s' failed to probe\n",
>   					  dev->name);
> -				if (last_dev == dev) {
> -					/*
> -					 * We have already tried this device
> -					 * and it failed to probe. Give up.
> -					 */
> -					return log_msg_ret("probe", ret);
> -				}
> -				last_dev = dev;
>   				dev = NULL;
>   			}
>   		}


  reply	other threads:[~2024-08-07  1:27 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 12:58 [PATCH v2 00/39] efi: Add a test for EFI bootmeth Simon Glass
2024-08-06 12:58 ` [PATCH v2 01/39] nvmxip: Drop the message on probe Simon Glass
2024-08-06 12:58 ` [PATCH v2 02/39] nvmxip: Avoid probing on boot Simon Glass
2024-08-06 12:58 ` [PATCH v2 03/39] bootstd: Add UT_TESTF_CONSOLE_REC to bootflow tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 04/39] test/py: Fix some pylint warnings in test_ut.py Simon Glass
2024-08-06 12:58 ` [PATCH v2 05/39] scripts: Update pylint.base Simon Glass
2024-08-06 12:58 ` [PATCH v2 06/39] bootstd: Create a function to reset USB Simon Glass
2024-08-07  1:56   ` Heinrich Schuchardt
2024-08-07 14:36     ` Simon Glass
2024-08-08 21:07       ` Heinrich Schuchardt
2024-08-11 14:50         ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 07/39] usb: Drop old non-DM code Simon Glass
2024-08-06 12:58 ` [PATCH v2 08/39] log: Add a new log category for the console Simon Glass
2024-08-06 12:58 ` [PATCH v2 09/39] usb: Add DEV_FLAGS_DM to stdio for USB keyboard Simon Glass
2024-08-06 12:58 ` [PATCH v2 10/39] dm: usb: Deal with USB keyboard persisting across tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 11/39] test: mbr: Adjust test to use lower-case hex Simon Glass
2024-08-06 12:58 ` [PATCH v2 12/39] test: mbr: Adjust test to drop 0x Simon Glass
2024-08-06 12:58 ` [PATCH v2 13/39] sandbox: Change the range used for memory-mapping tags Simon Glass
2024-08-06 12:58 ` [PATCH v2 14/39] sandbox: Update cpu to use logging Simon Glass
2024-08-06 12:58 ` [PATCH v2 15/39] sandbox: Unmap old tags Simon Glass
2024-08-06 12:58 ` [PATCH v2 16/39] sandbox: Add some debugging to pci_io Simon Glass
2024-08-06 12:58 ` [PATCH v2 17/39] sandbox: Implement reference counting for address mapping Simon Glass
2024-08-06 12:58 ` [PATCH v2 18/39] mmc: Use map_sysmem() with buffers in the mmc command Simon Glass
2024-08-06 12:58 ` [PATCH v2 19/39] read: Use map_sysmem() with buffers in the read command Simon Glass
2024-08-08 10:20   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 20/39] cmd: Fix memory-mapping in cmp command Simon Glass
2024-08-06 12:58 ` [PATCH v2 21/39] test: mbr: Unmap the buffers after use Simon Glass
2024-08-08 10:13   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 22/39] test: mbr: Use a constant for the block size Simon Glass
2024-08-08 10:15   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 23/39] test: mbr: Use RAM for the buffers Simon Glass
2024-08-06 12:58 ` [PATCH v2 24/39] test: mbr: Drop a duplicate test Simon Glass
2024-08-06 12:58 ` [PATCH v2 25/39] efi: Use puts() in cout so that console recording works Simon Glass
2024-08-07  0:37   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 26/39] efi_loader: Put back copyright message Simon Glass
2024-08-06 12:58 ` [PATCH v2 27/39] efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE Simon Glass
2024-08-07  1:01   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 28/39] efi_loader: Shorten the app rules Simon Glass
2024-08-07  1:04   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 29/39] efi_loader: Shorten the app rules further Simon Glass
2024-08-07  1:05   ` Heinrich Schuchardt
2024-08-07  7:00   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 30/39] efi: Show the vendor in helloworld Simon Glass
2024-08-07  1:22   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 31/39] Revert "bootdev: avoid infinite probe loop" Simon Glass
2024-08-07  1:27   ` Heinrich Schuchardt [this message]
2024-08-06 12:58 ` [PATCH v2 32/39] bootstd: Make bootdev_next_prio() continue after failure Simon Glass
2024-08-06 12:58 ` [PATCH v2 33/39] efi: Use the same filename for all sandbox builds Simon Glass
2024-08-08 10:18   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 34/39] bootstd: Add debugging for efi bootmeth Simon Glass
2024-08-06 12:58 ` [PATCH v2 35/39] efi: Disable ANSI output for tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 36/39] efi: Add a test app Simon Glass
2024-08-07  1:42   ` Heinrich Schuchardt
2024-08-07 14:36     ` Simon Glass
2024-08-08 21:17       ` Heinrich Schuchardt
2024-08-11 14:50         ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 37/39] efi: Avoid using sandbox virtio devices Simon Glass
2024-08-07  1:47   ` Heinrich Schuchardt
2024-08-07  1:56     ` Tom Rini
2024-08-08 18:44       ` Simon Glass
2024-08-08 20:06         ` Tom Rini
2024-08-11 14:50           ` Simon Glass
2024-08-14 17:56             ` Tom Rini
2024-08-15 20:33               ` Simon Glass
2024-08-15 22:56                 ` Tom Rini
2024-08-16  1:34                   ` Simon Glass
2024-08-16 23:53                 ` Simon Glass
2024-08-22 15:13                   ` Tom Rini
2024-08-22 17:11                     ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 38/39] test: Set up an image suitable for EFI testing Simon Glass
2024-08-06 12:58 ` [PATCH v2 39/39] efi: Add a test for the efi bootmeth Simon Glass

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=1fbea795-45b2-4226-8eec-50647ce06d32@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=bmeng.cn@gmail.com \
    --cc=caleb.connolly@linaro.org \
    --cc=dsimic@manjaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mibodhi@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=namcao@linutronix.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox