Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753828AbbGIM6d (ORCPT ); Thu, 9 Jul 2015 08:58:33 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:47640 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694AbbGIM6c (ORCPT ); Thu, 9 Jul 2015 08:58:32 -0400 X-Helo: d06dlp01.portsmouth.uk.ibm.com X-MailFrom: pmorel@linux.vnet.ibm.com X-RcptTo: netdev@vger.kernel.org From: Pierre Morel To: ericvh@gmail.com Cc: v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, virtualization@lists.linux-foundation.org Subject: [PATCH] 9p/trans_virtio: reset virtio device on remove Date: Thu, 9 Jul 2015 14:58:26 +0200 Message-Id: <1436446706-44314-1-git-send-email-pmorel@linux.vnet.ibm.com> X-Mailer: git-send-email 2.3.8 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15070912-0041-0000-0000-000004DE94D8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 35 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 Reviewed-by: Cornelia Huck --- net/9p/trans_virtio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9dd49ca..6e70ddb 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); -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/