Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15444236rwb; Mon, 28 Nov 2022 11:37:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6yi3uN0c766H8tCFwWv4B43T7PClrvUnhfYpP50c27xOLb8NU7nuLMf8gsm6+u/5chlToX X-Received: by 2002:a17:907:c787:b0:7ad:8035:ae3d with SMTP id tz7-20020a170907c78700b007ad8035ae3dmr1534672ejc.46.1669664261487; Mon, 28 Nov 2022 11:37:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669664261; cv=none; d=google.com; s=arc-20160816; b=TTFDrvKh/8D/6E3fjuyPvtKsvI9KB3VqUWKrhj4C/hJoK76zSZmLnZxw311V/cJ/Se kIvzUTyxxhxVJKr939tivCIfhQW/3WhkNtMw58oUd1gmNegT7T70J46rc9Vbtmjs7OX3 nnZwGjCHNJQYGBW5hUTOtENrvYMWkAnSur9a+aVcooC4ZgKMwOwOCR+o/zz3PbYz+3Bw IrBj1Uedx0Ko2N/ZpZwLk3cde/Cp4p7Px0g3/YY1cVyLk1U/UPGfRyAYBHuGCGa4HqPZ FKPsOY5il53lB+x1oXuS0vWP8UnLXcbgmhd4zuT/EEpgP02RalYWBMniKd+bTDmZ6c7+ 1UJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nYRUByL212OTBMMVhix0t+KY0BEqukc/TQnKhzG1llA=; b=HJH4moS+oBnoLvc0vgOwududgE+f/Cexnrf3PsQ94XzVshr7Ya5m57APkjwtPDTb6L 6Gldi4jRH2Is/ns5a+WNLUlHrhp94PTfHsQ/ne4N0p3jRyhSBQmKFcITpDmKh4XMt1k2 0UwdULn/F5Vsjac4wJ3DYVmWs/hshieE3kwp7Q/j4WRyJsPvgyqW+xFajS7KW8ZcHPcT Q6Fze06RG8K0QCO0QfT2hGsV/RndINu6WW+GOsZIJdkzTkKvySMU/1ZAfA0ZUh8cud2H BG8NuHDgRglyn6uEGUWfeIRtcBdFZnQ8a6HceplJeHQy6MQWmr7s2FvPnZT6ViDM+8GR qQ6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vmware.com header.s=s1024 header.b="Cq/q2Qk5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt15-20020a170907728f00b007ae2368c8b7si10978101ejc.138.2022.11.28.11.37.20; Mon, 28 Nov 2022 11:37:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vmware.com header.s=s1024 header.b="Cq/q2Qk5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233804AbiK1Tc2 (ORCPT + 84 others); Mon, 28 Nov 2022 14:32:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234100AbiK1TcI (ORCPT ); Mon, 28 Nov 2022 14:32:08 -0500 Received: from EX-PRD-EDGE02.vmware.com (ex-prd-edge02.vmware.com [208.91.3.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D85D2D745; Mon, 28 Nov 2022 11:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=s1024; d=vmware.com; h=from:to:cc:subject:date:message-id:in-reply-to:mime-version: content-type; bh=nYRUByL212OTBMMVhix0t+KY0BEqukc/TQnKhzG1llA=; b=Cq/q2Qk5VVP899fyhfKg5mE7eTON3Sk1X+WokPRY9NHx+N/OF/lFtqiQbQwYzq 8bljwrYUjKUNTRTBlVAOfcSYBt28Mdvw9CSEJXVAue6+mpbf/lJv1MGwOpSFIa jlX/7NUV4nGkkRJbv1D1KqSNHRDwc2fqoSfhXDiGmE6CnlY= Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX-PRD-EDGE02.vmware.com (10.188.245.7) with Microsoft SMTP Server id 15.1.2308.14; Mon, 28 Nov 2022 11:31:52 -0800 Received: from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.20.114.216]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 8580A20294; Mon, 28 Nov 2022 11:32:06 -0800 (PST) Received: by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0) id 80B25AE1B0; Mon, 28 Nov 2022 11:32:06 -0800 (PST) From: Ronak Doshi To: CC: Ronak Doshi , VMware PV-Drivers Reviewers , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Guolin Yang , open list Subject: [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues Date: Mon, 28 Nov 2022 11:32:04 -0800 Message-ID: <20221128193205.3820-3-doshir@vmware.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221128193205.3820-1-doshir@vmware.com> References: <20221128193205.3820-1-doshir@vmware.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX-PRD-EDGE02.vmware.com: doshir@vmware.com does not designate permitted sender hosts) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'Commit 39f9895a00f4 ("vmxnet3: add support for 32 Tx/Rx queues")' added support for 32Tx/Rx queues. As a part of this patch, intrConf structure was extended to incorporate increased queues. This patch fixes the issue where incorrect reference is being used. Fixes: 39f9895a00f4 ("vmxnet3: add support for 32 Tx/Rx queues") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang --- drivers/net/vmxnet3/vmxnet3_drv.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 611e8a85de17..39a7e90d4254 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -75,8 +75,14 @@ vmxnet3_enable_all_intrs(struct vmxnet3_adapter *adapter) for (i = 0; i < adapter->intr.num_intrs; i++) vmxnet3_enable_intr(adapter, i); - adapter->shared->devRead.intrConf.intrCtrl &= + if (!VMXNET3_VERSION_GE_6(adapter) || + !adapter->queuesExtEnabled) { + adapter->shared->devRead.intrConf.intrCtrl &= cpu_to_le32(~VMXNET3_IC_DISABLE_ALL); + } else { + adapter->shared->devReadExt.intrConfExt.intrCtrl &= + cpu_to_le32(~VMXNET3_IC_DISABLE_ALL); + } } @@ -85,8 +91,14 @@ vmxnet3_disable_all_intrs(struct vmxnet3_adapter *adapter) { int i; - adapter->shared->devRead.intrConf.intrCtrl |= + if (!VMXNET3_VERSION_GE_6(adapter) || + !adapter->queuesExtEnabled) { + adapter->shared->devRead.intrConf.intrCtrl |= cpu_to_le32(VMXNET3_IC_DISABLE_ALL); + } else { + adapter->shared->devReadExt.intrConfExt.intrCtrl |= + cpu_to_le32(VMXNET3_IC_DISABLE_ALL); + } for (i = 0; i < adapter->intr.num_intrs; i++) vmxnet3_disable_intr(adapter, i); } -- 2.11.0