virtio: console: Reset vdev before removing device
authorAmit Shah <amit.shah@redhat.com>
Thu, 2 Sep 2010 12:41:40 +0000 (18:11 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 21 Oct 2010 07:13:58 +0000 (17:43 +1030)
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>
drivers/char/virtio_console.c

index 0f69c5ec0ecd48a2af0045b02f9a6894b368a6b6..076d0358cf0e558a9de4acd3d1f98f216000b0cb 100644 (file)
@@ -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)