]> git.dujemihanovic.xyz Git - u-boot.git/commit
bootstd: Correct virtio block-device handling
authorSimon Glass <sjg@chromium.org>
Sat, 28 Jan 2023 22:00:20 +0000 (15:00 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 6 Feb 2023 18:04:53 +0000 (13:04 -0500)
commita710f5b2ebe6207125ee2260a7cfbe2b9e6e7ff3
treeffc05b7ac0014fab96825778ee050087394cd043
parent965020c3f7e11a8ee4f53023822d30d43345abde
bootstd: Correct virtio block-device handling

At present virtio tries to attach QEMU services to a bootdev device, which
cannot work. Add a check for this.

Also use bootdev_setup_sibling_blk() to create the bootdev device, since
it allows the correct name to be used and bootdev_get_sibling_blk() to
work as expected.

The bootdev is not created on sandbox since it does have a real virtio
device and it is not possible to read blocks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: a60f7a3e35b ("bootstd: Add a virtio bootdev")
Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/virtio/virtio-uclass.c