]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_console: move early VQ enablement
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 20 Oct 2014 13:58:49 +0000 (15:58 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 13 Nov 2014 07:53:26 +0000 (09:53 +0200)
commit890a116295d2ad74d97f71b408d509561b573cbd
tree4a858297ded216b231be941fab08bae31110136c
parent5b69731116214c747dd19798112a990641d3723e
virtio_console: move early VQ enablement

Commit f4a0ad56 (virtio_console: enable VQs early) tried to make
sure that DRIVER_OK was set when virtio_console started using its
virtqueues. Doing this in add_port(), however, means that we try
to set DRIVER_OK again when when a port is dynamically added after
the probe function is done.

Let's move virtio_device_ready() to the probe function just before
trying to use the virtqueues instead. This is fine as nothing can
fail inbetween.

Reported-by: Thomas Graf <tgraf@suug.ch>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/char/virtio_console.c