]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_console: enable VQs early
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 23:52:31 +0000 (10:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2014 23:55:03 +0000 (10:25 +1030)
commitf4a0ad56d4f8eb39839b63dfd55850dcb57b7034
tree08491413923d1c821db0403d17920c15d238a4df
parent48aaa1ef905d6977937d9f4ada0a9f8a45c9ec8a
virtio_console: enable VQs early

virtio spec requires drivers to set DRIVER_OK before using VQs.
This is set automatically after probe returns, virtio console violated this
rule by adding inbufs, 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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c