summaryrefslogtreecommitdiff
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-09-02 18:11:40 +0530
committerRusty Russell <rusty@rustcorp.com.au>2010-10-21 17:43:58 +1030
commit02238959944ce031f066f21e541a14933aca6575 (patch)
tree1b7a8e42cd02b86b350218e877d9c9185fdd8d79 /drivers/char/virtio_console.c
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
virtio: console: Reset vdev before removing device
The virtqueues should be disabled before attempting to remove the device. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r--drivers/char/virtio_console.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 0f69c5ec0ec..076d0358cf0 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1605,6 +1605,9 @@ static void virtcons_remove(struct virtio_device *vdev)
portdev = vdev->priv;
+ /* Disable interrupts for vqs */
+ vdev->config->reset(vdev);
+ /* Finish up work that's lined up */
cancel_work_sync(&portdev->control_work);
list_for_each_entry_safe(port, port2, &portdev->ports, list)