* [U-Boot] [PATCH] api_storage: Fix non-first storage device enumeration
@ 2015-09-14 10:21 Andreas Färber
2015-09-15 21:34 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2015-09-14 10:21 UTC (permalink / raw)
To: u-boot
When enabling CONFIG_API and chain-loading GRUB2 on jetson-tk1, only the
eMMC would show up as (hd0), but not the SD card, leading to GRUB not
finding its configuration and modules, falling back to a rescue shell.
This is because enum_ended would get set for !more after returning a
cookie for the first MMC device in group 3.
Fix this by properly setting the "more" argument also in the case of the
first storage device of a group.
Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
api/api_storage.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/api/api_storage.c b/api/api_storage.c
index b76b07d..ec92ae4 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -112,6 +112,11 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
else
found = 1;
+ /* provide hint if there are more devices in
+ * this group to enumerate */
+ if (1 < specs[type].max_dev)
+ *more = 1;
+
} else {
for (i = 0; i < specs[type].max_dev; i++)
if (di->cookie == (void *)get_dev(specs[type].name, i)) {
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-15 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 10:21 [U-Boot] [PATCH] api_storage: Fix non-first storage device enumeration Andreas Färber
2015-09-15 21:34 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox