diff options
author | Pierre Morel <pmorel@linux.vnet.ibm.com> | 2015-07-09 14:58:26 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-07-13 19:47:10 +0300 |
commit | ea52bf8eda9832ad30e9f059c5ead8d44f882a53 (patch) | |
tree | 7c0de6d795c587d801f5b4c6eb2106526056396b /net/9p | |
parent | 1b568d934eec1c5c99565c41f6c8ca66e9743e96 (diff) | |
download | linux-stable-ea52bf8eda9832ad30e9f059c5ead8d44f882a53.tar.gz linux-stable-ea52bf8eda9832ad30e9f059c5ead8d44f882a53.tar.bz2 linux-stable-ea52bf8eda9832ad30e9f059c5ead8d44f882a53.zip |
9p/trans_virtio: reset virtio device on remove
On device shutdown/removal, virtio drivers need to trigger a reset on
the device; if this is neglected, the virtio core will complain about
non-zero device status.
This patch resets the status when the 9p virtio driver is removed
from the system by calling vdev->config->reset on the virtio_device
to send a reset to the host virtio device.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/trans_virtio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9dd49ca67dbc..6e70ddb158b4 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -704,6 +704,7 @@ static void p9_virtio_remove(struct virtio_device *vdev) mutex_unlock(&virtio_9p_lock); + vdev->config->reset(vdev); vdev->config->del_vqs(vdev); sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); |