diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-19 08:46:47 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-19 08:46:47 -0500 |
commit | f4d54865061495bdb483f9ddc81183d1940f596c (patch) | |
tree | 203ec612e1a7b41602e5616c5f480d89caf1ff95 /boot/bootdev-uclass.c | |
parent | cb493752394adec8db1d6f5e9b8fb3c43e13f10a (diff) | |
parent | 46371f269986976b3e969c0985820169b766ff76 (diff) |
Merge branch '2024-01-18-assorted-fixes'
- A number of OS boot related cleanups, a number of TI platform
fixes/cleanups, SMBIOS fixes, tweak get_maintainers.pl to report me
for more places, fix the "clean the build" pytest and add a bootstage
pytest, fix PKCS11 URI being omitted in some valid cases, make an iommu
problem easier to debug on new platforms, nvme and pci improvements,
refactor image-host code a bit, fix a typo in env setting, add a missing
dependency for CMD_LICENSE, and correct how we call getchar() in some
places.
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r-- | boot/bootdev-uclass.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 4926a50da85..35afb93c0e7 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; + struct udevice *dev = *devp, *last_dev = NULL; bool found; int ret; @@ -682,9 +682,19 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp) } } else { ret = device_probe(dev); + if (!ret) + last_dev = dev; if (ret) { - log_debug("Device '%s' failed to probe\n", + log_warning("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; } } |