summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian Pötzsch <[email protected]>2026-03-10 08:16:42 -0600
committerTom Rini <[email protected]>2026-03-25 14:33:00 -0600
commit30e1733297ac7d9703bd0950bd237648dcb41850 (patch)
tree0dc5c2eb6083cb84bde3d5a9fcea4219ebc3ba8d /drivers
parentb8e6c5d0ddc18c739fa3d2b8a78abbfc265909f3 (diff)
virtio: Fix virtio initialization sequence
The virtio spec clearly states in "3.1.1 Driver Requirements: Device Initialization" the sequence a client has to follow after device reset. Because u-boot resets here again, it also needs to set the "acknowledge" bit again even if this was done in virtio_uclass_child_post_bind already once before. Signed-off-by: Christian Pötzsch <[email protected]> Signed-off-by: Adam Lackorzynski <[email protected]> [trini: Add VIRTIO_CONFIG_S_ACKNOWLEDGE flag check to the test] Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/virtio/virtio-uclass.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index ac563991b90..c36e9e9b3a7 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -292,6 +292,9 @@ static int virtio_uclass_child_pre_probe(struct udevice *vdev)
if (ret)
goto err;
+ /* After a reset we always need to start the init sequence again */
+ virtio_add_status(vdev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
+
/* We have a driver! */
virtio_add_status(vdev, VIRTIO_CONFIG_S_DRIVER);