Skip to content

Commit

Permalink
virtio: console: Reset vdev before removing device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Shah authored and Rusty Russell committed Oct 21, 2010
1 parent f6f94e2 commit 0223895
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0223895

Please sign in to comment.