From: Ludwig Nussel Date: Mon, 4 May 2026 07:10:23 +0000 (+0200) Subject: virtio: fix boot device hunting in qemu with virtio X-Git-Tag: v2026.07-rc2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18806dae0e6fa9e0912a258e15f61b1b346dfdbc;p=thirdparty%2Fu-boot.git virtio: fix boot device hunting in qemu with virtio Commit 70101c3217ae ("virtio: mmio: Return error codes on probe failures") returns -ENODEV where it would return 0 before. That path is apparently hit in qemu and breaks boot device discovery (virtio_bootdev_hunt() expects only ENOENT). So return -ENOENT in that path instead. The remaining two error returns in the function are untouched as I don't know where they play a role. Signed-off-by: Ludwig Nussel Reviewed-by: Simon Glass Acked-by: Kuan-Wei Chiu --- diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 62afe609ec0..d90d8309f99 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -372,7 +372,7 @@ static int virtio_mmio_probe(struct udevice *udev) * virtio-mmio device with an ID 0 is a (dummy) placeholder * with no function. End probing now with no error reported. */ - return -ENODEV; + return -ENOENT; } uc_priv->vendor = readl(priv->base + VIRTIO_MMIO_VENDOR_ID);