Commit 88704454 authored by Stefano Garzarella's avatar Stefano Garzarella Committed by Jakub Kicinski

vsock/virtio: enable VQs early on probe

virtio spec requires drivers to set DRIVER_OK before using VQs.
This is set automatically after probe returns, but virtio-vsock
driver uses VQs in the probe function to fill rx and event VQs
with new buffers.

Let's fix this, calling virtio_device_ready() before using VQs
in the probe function.

Fixes: 0ea9e1d3 ("VSOCK: Introduce virtio_transport.ko")
Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c1011c0b
...@@ -627,6 +627,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev) ...@@ -627,6 +627,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
vdev->priv = vsock; vdev->priv = vsock;
virtio_device_ready(vdev);
mutex_lock(&vsock->tx_lock); mutex_lock(&vsock->tx_lock);
vsock->tx_run = true; vsock->tx_run = true;
mutex_unlock(&vsock->tx_lock); mutex_unlock(&vsock->tx_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment