From: Amit Shah Date: Thu, 2 Sep 2010 12:41:40 +0000 (+0530) Subject: virtio: console: Reset vdev before removing device X-Git-Tag: firefly_0821_release~7613^2~3742^2~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02238959944ce031f066f21e541a14933aca6575;p=firefly-linux-kernel-4.4.55.git virtio: console: Reset vdev before removing device The virtqueues should be disabled before attempting to remove the device. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell --- 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) 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)