Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02238959 authored by Amit Shah's avatar Amit Shah Committed by Rusty Russell
Browse files

virtio: console: Reset vdev before removing device



The virtqueues should be disabled before attempting to remove the
device.

Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent f6f94e2a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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)