diff options
author | Andreas Färber <afaerber@suse.de> | 2015-09-14 12:21:34 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-09-15 15:05:23 -0400 |
commit | ce2a07b77ceae8ed4b95a1c0165c6e179252ffee (patch) | |
tree | a065562ad3dd1db044c81ce3b7347b3a4628e2c6 /api | |
parent | 86dc8b14f9e372cbcd04e55ca9f8dc8c62329f8f (diff) | |
download | u-boot-ce2a07b77ceae8ed4b95a1c0165c6e179252ffee.zip u-boot-ce2a07b77ceae8ed4b95a1c0165c6e179252ffee.tar.gz u-boot-ce2a07b77ceae8ed4b95a1c0165c6e179252ffee.tar.bz2 |
api_storage: Fix non-first storage device enumeration
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>
Diffstat (limited to 'api')
-rw-r--r-- | api/api_storage.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)) { |