diff options
| author | Christian Pötzsch <[email protected]> | 2026-03-10 08:16:42 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-25 14:33:00 -0600 |
| commit | 30e1733297ac7d9703bd0950bd237648dcb41850 (patch) | |
| tree | 0dc5c2eb6083cb84bde3d5a9fcea4219ebc3ba8d /test | |
| parent | b8e6c5d0ddc18c739fa3d2b8a78abbfc265909f3 (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 'test')
| -rw-r--r-- | test/dm/virtio_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dm/virtio_device.c b/test/dm/virtio_device.c index 53414e4d3a4..c2cd0630d97 100644 --- a/test/dm/virtio_device.c +++ b/test/dm/virtio_device.c @@ -40,6 +40,7 @@ static int dm_test_virtio_base(struct unit_test_state *uts) ut_assertok(virtio_get_status(dev, &status)); ut_asserteq(VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK | + VIRTIO_CONFIG_S_ACKNOWLEDGE | VIRTIO_CONFIG_S_FEATURES_OK, status); return 0; |
