Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2048866rwb; Wed, 30 Nov 2022 01:23:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cYVWsxpdP1QeFJ8cd+aWjBZNz3wm6ZP4ikjjliFMBqxewTgH+Ch1E1uLk3VEp8mLGKmi8 X-Received: by 2002:aa7:d556:0:b0:45c:6467:94e2 with SMTP id u22-20020aa7d556000000b0045c646794e2mr54466868edr.295.1669800183382; Wed, 30 Nov 2022 01:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669800183; cv=none; d=google.com; s=arc-20160816; b=oBd9rNQV4R3DgJKsZexwVHHGI5aJe9CgdgELvf8F1c7ZTvLIyn7PsGOKR/+qY4FrMW kb3iioHc+tivDTKsKRV2pbvA7YCtYcsA5KNSpGMMXUGtMtZVjrgXcBUGZnfv0Spwzrhh Mn+kRyvVtUZCnkVSlnSKDOVdFiHuDA4mQdlr+1ENNjLROja9ubiC2iH40K/fERDQ0Fxd DL6hCLvtT2Zar7E7P8i7RD+sQ5AfSKdC+Obd30MRuSZwYx+Sssse6aJFQHSz/QcRsAAf 8irE1S4U2iwH697n6SuUI6M/oYaC/ymO9nreP20RkHTWchCbVetwB8KrXitAoSUmHvTs PoVw== 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=l2wRLhIEBDsfPv3cERhwpGHkEzokdwLhIG0YQM1eeac=; b=LACuubYgCFo70KPp80nlp4SJzDx4wIArGTO0WRr9SYd6Rcf+vWM8Q27Thl/IoUOk7A rlajLaI1p/BDlLhj1OIUVqIUWanGNgpiAv1Xqu/TTh0daJQgJaOm0vuC4KqXzO8UfRyc dXyhms9V29aGjzbAfk4m0xCwe+Oh9MBJ7GglKCxqFd/X9bYvBvzTqQTZpCHicBdg2YGP NAT4fxxxSYAzyThxEyCNWBZ9+5KeypXqXnWWN3f0iZNbHfBIvIMHFXdrPOHG9Qnf8zNL TPlIY9zWT3YvVZ89LuA8Jd0jgnEBD+UGodDgyb8OkZFS1X5m1TF7tVxeT4eWV7MDFLT0 +pKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vmware.com header.s=s1024 header.b=ectokALG; 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 di12-20020a170906730c00b007be079862c8si881044ejc.965.2022.11.30.01.22.42; Wed, 30 Nov 2022 01:23:03 -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=ectokALG; 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 S234624AbiK3IWR (ORCPT + 84 others); Wed, 30 Nov 2022 03:22:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbiK3IWL (ORCPT ); Wed, 30 Nov 2022 03:22:11 -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 248945915A; Wed, 30 Nov 2022 00:22:10 -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=l2wRLhIEBDsfPv3cERhwpGHkEzokdwLhIG0YQM1eeac=; b=ectokALGnvwmm4SaVqKWMoDjlcFe8lwyxAqSMaSnIlFeFWweqvxPSmN8a0vkm/ CmFvjorNoz4B//mcjgJC1jHH42oeX1dnNbnZGRBNTKxNOKUYnN4Ch8y9Or27SN t6uIuOCKm9g3uMMCRlb+Tlmfpr9NiFWIKcIXefiMb1fQ/iE= Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX-PRD-EDGE02.vmware.com (10.188.245.7) with Microsoft SMTP Server id 15.1.2308.14; Wed, 30 Nov 2022 00:21:48 -0800 Received: from htb-1n-eng-dhcp122.eng.vmware.com (unknown [10.20.114.216]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 8E1CC20301; Wed, 30 Nov 2022 00:22:02 -0800 (PST) Received: by htb-1n-eng-dhcp122.eng.vmware.com (Postfix, from userid 0) id 88447AE1D1; Wed, 30 Nov 2022 00:22:02 -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 v2 net 2/2] vmxnet3: use correct intrConf reference when using extended queues Date: Wed, 30 Nov 2022 00:21:47 -0800 Message-ID: <20221130082148.9605-3-doshir@vmware.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221130082148.9605-1-doshir@vmware.com> References: <20221130082148.9605-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 3111a8a6b26a..6f1e560fb15c 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