mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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>
This commit is contained in:
parent
f6f94e2ab1
commit
0223895994
1 changed files with 3 additions and 0 deletions
|
@ -1605,6 +1605,9 @@ static void virtcons_remove(struct virtio_device *vdev)
|
||||||
|
|
||||||
portdev = vdev->priv;
|
portdev = vdev->priv;
|
||||||
|
|
||||||
|
/* Disable interrupts for vqs */
|
||||||
|
vdev->config->reset(vdev);
|
||||||
|
/* Finish up work that's lined up */
|
||||||
cancel_work_sync(&portdev->control_work);
|
cancel_work_sync(&portdev->control_work);
|
||||||
|
|
||||||
list_for_each_entry_safe(port, port2, &portdev->ports, list)
|
list_for_each_entry_safe(port, port2, &portdev->ports, list)
|
||||||
|
|
Loading…
Reference in a new issue