From: "Andreas Färber" <afaerber@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] api_storage: Fix non-first storage device enumeration
Date: Mon, 14 Sep 2015 12:21:34 +0200 [thread overview]
Message-ID: <1442226095-12652-1-git-send-email-afaerber@suse.de> (raw)
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
next reply other threads:[~2015-09-14 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 10:21 Andreas Färber [this message]
2015-09-15 21:34 ` [U-Boot] api_storage: Fix non-first storage device enumeration Tom Rini
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=1442226095-12652-1-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--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;
as well as URLs for NNTP newsgroup(s).