diff options
| author | Tom Rini <[email protected]> | 2024-01-19 08:46:47 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-01-19 08:46:47 -0500 |
| commit | f4d54865061495bdb483f9ddc81183d1940f596c (patch) | |
| tree | 203ec612e1a7b41602e5616c5f480d89caf1ff95 /boot | |
| 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')
| -rw-r--r-- | boot/bootdev-uclass.c | 14 | ||||
| -rw-r--r-- | boot/bootflow.c | 6 | ||||
| -rw-r--r-- | boot/bootflow_menu.c | 1 |
3 files changed, 14 insertions, 7 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; } } diff --git a/boot/bootflow.c b/boot/bootflow.c index 1ea2966ae9a..05484fd5b1b 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -361,7 +361,7 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow) } /* Unless there is nothing more to try, move to the next device */ - else if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { + if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) { log_debug("Bootdev '%s' part %d method '%s': Error %d\n", dev->name, iter->part, iter->method->name, ret); /* @@ -371,10 +371,8 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow) if (iter->flags & BOOTFLOWIF_ALL) return log_msg_ret("all", ret); } - if (ret) - return log_msg_ret("check", ret); - return 0; + return log_msg_ret("check", ret); } int bootflow_scan_first(struct udevice *dev, const char *label, diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 7c1abe5772c..16f9cd8f8ca 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -120,7 +120,6 @@ int bootflow_menu_new(struct expo **expp) if (ret < 0) return log_msg_ret("itm", -EINVAL); - ret = 0; priv->num_bootflows++; } |
