diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-09-02 08:41:40 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-10-21 03:13:58 -0400 |
commit | 02238959944ce031f066f21e541a14933aca6575 (patch) | |
tree | 1b7a8e42cd02b86b350218e877d9c9185fdd8d79 /drivers/char/virtio_console.c | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 0f69c5ec0ecd..076d0358cf0e 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) | |||
1605 | 1605 | ||
1606 | portdev = vdev->priv; | 1606 | portdev = vdev->priv; |
1607 | 1607 | ||
1608 | /* Disable interrupts for vqs */ | ||
1609 | vdev->config->reset(vdev); | ||
1610 | /* Finish up work that's lined up */ | ||
1608 | cancel_work_sync(&portdev->control_work); | 1611 | cancel_work_sync(&portdev->control_work); |
1609 | 1612 | ||
1610 | list_for_each_entry_safe(port, port2, &portdev->ports, list) | 1613 | list_for_each_entry_safe(port, port2, &portdev->ports, list) |