]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_blk: enable VQs early
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 23:52:30 +0000 (10:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2014 23:55:02 +0000 (10:25 +1030)
commit48aaa1ef905d6977937d9f4ada0a9f8a45c9ec8a
tree2d63d93824a632ed1ca62f081d85e87a8ef214a4
parent5a6959ad2b648ac3cea4381b0dddafcaea99bd9e
virtio_blk: enable VQs early

virtio spec requires drivers to set DRIVER_OK before using VQs.
This is set automatically after probe returns, virtio block violated this
rule by calling add_disk, which causes the VQ to be used directly within
probe.

To fix, call virtio_device_ready before using VQs.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/block/virtio_blk.c