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]>
---
 drivers/virtio/virtio-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

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

Reply via email to