From patchwork Fri Nov 25 14:57:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhu, Lingshan" X-Patchwork-Id: 13056045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA82C43217 for ; Fri, 25 Nov 2022 15:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbiKYPGt (ORCPT ); Fri, 25 Nov 2022 10:06:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbiKYPGo (ORCPT ); Fri, 25 Nov 2022 10:06:44 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4F6A429A3; Fri, 25 Nov 2022 07:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669388803; x=1700924803; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sc7yv6l7w+mdzUT7XAZNvCklCr0OubkKRD1No7y/EJw=; b=CwbWYN700bMLz9hiFeOYaSKqPAak5YM7mm2F0+u+NlwyGaNme2NwvGGz Vrr5uGPzkSxQhEtLG+ti+/TkY7pWUAJ6Lfqb+rurL2hjAKsSblUr5QvC5 AHgEvw0+00yQGXJKQrDBsnii7bS4ceS+Q/XlfkazWRMtKQifHRcugvOjB 0gQh3snOuQamBkFkLhGTwJNcQqHR3F3hHdzsGUj4YCWzl8YZcT5NNdudj KfElkPCoDN0L6r7vAkZt9gN0kKxfF2qu+no26wnw68iv7emiB1Wxp/x6n r4jL8oYElExjJJ15J3BRXTlhUOviWepKmDkICPJFs927ieEE5uq9J4gke A==; X-IronPort-AV: E=McAfee;i="6500,9779,10542"; a="294881040" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="294881040" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 07:06:43 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10542"; a="593240289" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="593240289" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([10.240.193.73]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 07:06:41 -0800 From: Zhu Lingshan To: jasowang@redhat.com, mst@redhat.com Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, hang.yuan@intel.com, piotr.uminski@intel.com, Zhu Lingshan , stable@vger.kernel.org Subject: [PATCH V2 08/12] vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw Date: Fri, 25 Nov 2022 22:57:20 +0800 Message-Id: <20221125145724.1129962-9-lingshan.zhu@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221125145724.1129962-1-lingshan.zhu@intel.com> References: <20221125145724.1129962-1-lingshan.zhu@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org All ifcvf_request_irq's callees are refactored to work on ifcvf_hw, so it should be decoupled from the adapter as well Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org --- drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 8320bdacace8..cb3df395d3fb 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -314,9 +314,8 @@ static int ifcvf_request_config_irq(struct ifcvf_hw *vf) return -EFAULT; } -static int ifcvf_request_irq(struct ifcvf_adapter *adapter) +static int ifcvf_request_irq(struct ifcvf_hw *vf) { - struct ifcvf_hw *vf = &adapter->vf; int nvectors, ret, max_intr; nvectors = ifcvf_alloc_vectors(vf); @@ -468,7 +467,7 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { - ret = ifcvf_request_irq(adapter); + ret = ifcvf_request_irq(vf); if (ret) { status = ifcvf_get_status(vf); status |= VIRTIO_CONFIG_S_FAILED;