1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-18 00:11:48 +02:00

bootstd: Probe the block device before use

In some cases the block device is obtained but is not probed, since it
is a sibling of the bootdev. Make sure it is probed, so it can be used
without any trouble.

This fixes a bug with virtio, where the device is accessed before it has
been set up by the virtio uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 201417d700 ("bootstd: Add the bootdev uclass")
Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Simon Glass
2023-01-28 15:00:19 -07:00
committed by Tom Rini
parent 0041b1c09a
commit 965020c3f7
2 changed files with 7 additions and 0 deletions

View File

@@ -309,6 +309,9 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp)
if (ret)
return log_msg_ret("find", ret);
}
ret = device_probe(blk);
if (ret)
return log_msg_ret("act", ret);
*blkp = blk;
return 0;