[resend PATCH] bootdev: avoid infinite probe loop
Caleb Connolly
caleb.connolly at linaro.org
Thu Jan 4 17:12:21 CET 2024
Hi Simon,
On 04/01/2024 16:06, Simon Glass wrote:
> Hi Caleb,
>
> On Thu, Jan 4, 2024 at 9:03 AM Caleb Connolly <caleb.connolly at linaro.org> wrote:
>>
>> Sometimes, when only one bootdev is available, and it fails to probe, we
>> end up in an infinite loop calling probe() on the same device over and
>> over. With only debug level log output.
>>
>> Break the loop if we fail to probe the same device twice in a row, and
>> promote the probe failure message to log_warning().
>>
>> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
>> ---
>> Resend, actually change log message to WARN loglevel.
>> ---
>> boot/bootdev-uclass.c | 14 ++++++++++++--
>> 1 file changed, 12 insertions(+), 2 deletions(-)
>>
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> Thanks for the fix. Is this something for which a test could be added?
> One that fails (hangs) now but works with your patch?
I'm not sure, I'm not very familiar with the U-Boot testing
infrastructure yet. I guess this should be testable without having to
solve the halting problem :P but I don't know how best to go about
writing one.
>
> Regards,
> Simon
--
// Caleb (they/them)
More information about the U-Boot
mailing list