Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3446494pxb; Wed, 13 Oct 2021 06:16:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5GaHBAQuxCpzCBH57daQevWVfY7Mfb0cQzAIxmJftjE1cQY4qalYuxkPs79HN3WZi1z07 X-Received: by 2002:a17:902:be0c:b0:13e:2b53:d3 with SMTP id r12-20020a170902be0c00b0013e2b5300d3mr36046910pls.86.1634131004769; Wed, 13 Oct 2021 06:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634131004; cv=none; d=google.com; s=arc-20160816; b=Py2nMjyksRB7v3Cv6aQH6Jt1VSrsnp/9MfRnWKLXA+WVyiwmKd3l3q2wQxEjCNwQnh QEZQ1ka9+eCnzIQ/92o1LtMqKJl/hOn7iqE9EsPQkMWHRGveh+4AnEXPAc67UE3chCk0 /hmIkfNZ+Q1aGbJAD635/H1LWv+gO8sAWinZr69m1bJM2TYwozbgbWNSlpCq95B8iG1y QKT3NrzxaHiRjabcxv69fy3sAOi1zdIgdR5pzHyDAKZ5LQwSxYn2W9oW5tPae+lTLo2t /wjbh7BFdBSakEsF693xMmcs9hKtuuhPZwK/bOknFO6CejMsROvvmUw/PfdRD9mikkad L2jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=xoDh4vTPEgfcSu0D2JIw29T74i8TU1SCFBns89BGyrvT9lQryKd+vb1s82wGV0oYkk iZfmUVDaCvacXxnwr5U2LO3RbICP3zjWA5QaNedKExRBXH/B8prIYv+p8pvCZs1XtPrQ Gh/AO7Cr3SVAyquAvWxqp06d9s67I6pzZpDflXMtCbrqHcZfkcxEaJNG3D05Y77C4rMB NyBGBtH5ziiugIs2K9XUoaxx5BtNWjZNGeM4s7xbXJRaoS0WB0i36GjnD32xIATFghmD 0LMdZb/T+yWEN4OH+c45itm+Nsamk9PfzfPVzMMNh//ChEenyTBRqJLyheJHgkDSyjZv MXaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SE2eHZFv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si21833143pgu.153.2021.10.13.06.16.31; Wed, 13 Oct 2021 06:16:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SE2eHZFv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233015AbhJMNSa (ORCPT + 63 others); Wed, 13 Oct 2021 09:18:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42373 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231294AbhJMNSa (ORCPT ); Wed, 13 Oct 2021 09:18:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634130986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3UweUBspHinuJSQhguEdx6WU40R4nh4wg670z3EQDCs=; b=SE2eHZFv2EYRPciykUvuv3axb7IMWzper0DAABIFt4kpNGY+LNjiufZFUTwYqPW3KwlSp6 tnaRT2PPTk8FXujBxyCu3rEdmEwpIi3FOdugnLa6d5HGAY5wLPegbwPWuIFE1qK9/9wNDY xeEcEn5Da35HmArD1DhU4zZs1UWwLKk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-397-51EXKiPTPNOe2wB9MiFWRQ-1; Wed, 13 Oct 2021 09:16:25 -0400 X-MC-Unique: 51EXKiPTPNOe2wB9MiFWRQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85FDA100A95A; Wed, 13 Oct 2021 13:16:22 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.33.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6603219E7E; Wed, 13 Oct 2021 13:16:20 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DEFAB22023A; Wed, 13 Oct 2021 09:16:19 -0400 (EDT) Date: Wed, 13 Oct 2021 09:16:19 -0400 From: Vivek Goyal To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Jeff Dike , Richard Weinberger , Anton Ivanov , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Jens Axboe , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Matt Mackall , Herbert Xu , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Gonglei , "David S. Miller" , Sudeep Holla , Cristian Marussi , "Enrico Weigelt, metux IT consult" , Viresh Kumar , Linus Walleij , Bartosz Golaszewski , David Airlie , Gerd Hoffmann , Daniel Vetter , Jie Deng , Jean-Philippe Brucker , Joerg Roedel , Will Deacon , Jakub Kicinski , Johannes Berg , Kalle Valo , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Ohad Ben-Cohen , Bjorn Andersson , Mathieu Poirier , "James E.J. Bottomley" , "Martin K. Petersen" , David Hildenbrand , Miklos Szeredi , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Stefano Garzarella , Anton Yakovlev , Jaroslav Kysela , Takashi Iwai , linux-um@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, nvdimm@lists.linux.dev, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, kvm@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH RFC] virtio: wrap config->reset calls Message-ID: References: <20211013105226.20225-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013105226.20225-1-mst@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by: Michael S. Tsirkin > --- > arch/um/drivers/virt-pci.c | 2 +- > drivers/block/virtio_blk.c | 4 ++-- > drivers/bluetooth/virtio_bt.c | 2 +- > drivers/char/hw_random/virtio-rng.c | 2 +- > drivers/char/virtio_console.c | 4 ++-- > drivers/crypto/virtio/virtio_crypto_core.c | 8 ++++---- > drivers/firmware/arm_scmi/virtio.c | 2 +- > drivers/gpio/gpio-virtio.c | 2 +- > drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +- > drivers/i2c/busses/i2c-virtio.c | 2 +- > drivers/iommu/virtio-iommu.c | 2 +- > drivers/net/caif/caif_virtio.c | 2 +- > drivers/net/virtio_net.c | 4 ++-- > drivers/net/wireless/mac80211_hwsim.c | 2 +- > drivers/nvdimm/virtio_pmem.c | 2 +- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > drivers/scsi/virtio_scsi.c | 2 +- > drivers/virtio/virtio.c | 5 +++++ > drivers/virtio/virtio_balloon.c | 2 +- > drivers/virtio/virtio_input.c | 2 +- > drivers/virtio/virtio_mem.c | 2 +- > fs/fuse/virtio_fs.c | 4 ++-- fs/fuse/virtio_fs.c changes look good to me. Reviewed-by: Vivek Goyal Vivek [..] > diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c > index 0ad89c6629d7..27c3b74070a2 100644 > --- a/fs/fuse/virtio_fs.c > +++ b/fs/fuse/virtio_fs.c > @@ -895,7 +895,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) > return 0; > > out_vqs: > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > kfree(fs->vqs); > > @@ -927,7 +927,7 @@ static void virtio_fs_remove(struct virtio_device *vdev) > list_del_init(&fs->list); > virtio_fs_stop_all_queues(fs); > virtio_fs_drain_all_queues_locked(fs); > - vdev->config->reset(vdev); > + virtio_reset_device(vdev); > virtio_fs_cleanup_vqs(vdev, fs); > > vdev->priv = NULL; Thanks Vivek