U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] virtio: fix boot device hunting in qemu with virtio
@ 2026-05-04  7:10 Ludwig Nussel
  2026-05-04 12:15 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ludwig Nussel @ 2026-05-04  7:10 UTC (permalink / raw)
  To: u-boot; +Cc: Ludwig Nussel, Bin Meng, Daniel Palmer, Kuan-Wei Chiu, Tom Rini

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 <ludwig.nussel@siemens.com>

---

Changes in v2:
 - return ENOENT in probe()

 drivers/virtio/virtio_mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 
-- 
2.43.0

base-commit: 4433253ecf2041f9362a763bb6cb79960921ac7e
branch: us-virtio2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-08 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  7:10 [PATCH v2] virtio: fix boot device hunting in qemu with virtio Ludwig Nussel
2026-05-04 12:15 ` Simon Glass
2026-05-06 14:53 ` Kuan-Wei Chiu
2026-05-08 23:14 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox