Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2286885rwo; Sun, 23 Jul 2023 11:35:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFLL5Kf76AhykFqqECFNBw/LChW3x3qT8pQ0D1y63D65tGsBx10tmiMQaSGCRo2KT0DjSrJ X-Received: by 2002:a17:90b:3543:b0:268:326:1935 with SMTP id lt3-20020a17090b354300b0026803261935mr3282235pjb.0.1690137351208; Sun, 23 Jul 2023 11:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690137351; cv=none; d=google.com; s=arc-20160816; b=NpaRCRw6WYDdiR2SYPA5Xe/38ueXDcG6ugiCvupRumMqgxz1OgBlKNtszK4W6grjVG g+dOQcGbMlw0xG2XauCRDrqvLacrx5bobz71xpTRGxsA7IvGHVK7Z1dG2wkAaUzjKfeA pKzZ1RCGLy9uKtjfm35hECK3FemKRGlDAbuf4qVQ+3hZ/LM/YVMKYrVyb+c/jG21UZvc YCjh0bHCSTwM5Otn1YtUneXNGvAaOAQTfKHOyQHkQTL2IKYj6n45f/9Ur8kHSvcK0u+h dFRuRvniJEgDhtzCjqV0X3k6Hdf9D6czQCpjoiF2KKuD05uhsZlY1tunvBwZ8xersIjA 1GJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C0xPvxkGmvpZZKX8r6B9DNbRQ9aUKvuR4yQsgLEgQ3I=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=Ng2xZuXWE1ZQHiL2nObTd85/FV/S9G8DFIHAQgPmhALAmdqrqTmzeXjzhzSGxae2WD jEItHk1cK570Y4HxcHVpfPFHZwPB9Kq9BTxz9Jw90B1zDcin6cH10glfSX/OeaIrdPoR 9tJc5kTmagUVQrIQJsf+lu0Eh5fdYhMpAVEEX7nZzXDi9NU8vM24M0pBNL29/ueAMDqQ Ww57Iuj8VCs84l5s4zi55eL4EckBRuH0sbqIt6U9I3fNi+Gzq19GKFLGe7BYL3326Wyb B5f6FiiNv2o2msbL8I9M0zQrozAT9XIwjP9jAe+XkdQM8++PY3ZzQ+3hqUuKN3FDVEAE 3eiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gxJgtT6d; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn16-20020a17090b38d000b0026383536294si8023140pjb.175.2023.07.23.11.35.39; Sun, 23 Jul 2023 11:35:51 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=gxJgtT6d; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbjGWQWb (ORCPT + 99 others); Sun, 23 Jul 2023 12:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbjGWQW1 (ORCPT ); Sun, 23 Jul 2023 12:22:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF82810D8; Sun, 23 Jul 2023 09:22:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08CB960DFC; Sun, 23 Jul 2023 16:22:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9942C433AB; Sun, 23 Jul 2023 16:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690129341; bh=DE4uo4JK2isjtFObJJyFLlrT5b6CK5kuMo4uw+Jhg2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gxJgtT6d+8MMUOnhiMgFqecA9A+UoZoYEZNBjfGO7bMmMtFyDCJj74mzDvTPDGSFX BaBhs3Kk9mauFNzspZZzLvp5EuM+Qt0nPs8kQxHU+BFAOYzECl02gnEN5ycZzDb1mw 4Pf4F8ML0PDzrzkWtTImdtpr7iGZoY5V3pmDqmg9/VtEYr+xvnq2JB9E9O49zNMHmt TkUWAoCS+szIh3RBP1FBx6QjsUmO4ldMvwapT0qB31xP2IXk9ep16DVcN3ljFUcH8q 9WObdGpuZoUZvGrwoFRWAP3iZrRtoIcUPwuJW6kPTbe26MtMh7EyvX5GYLSMSXW5RC hfmfkt6k3DngA== From: Jisheng Zhang To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next 04/10] net: stmmac: enlarge max rx/tx queues and channels to 16 Date: Mon, 24 Jul 2023 00:10:23 +0800 Message-Id: <20230723161029.1345-5-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230723161029.1345-1-jszhang@kernel.org> References: <20230723161029.1345-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 xgmac supports up to 16 rx/tx queues and up to 16 channels. Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 5 ++--- include/linux/stmmac.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c index a0c2ef8bb0ac..aaae82d3d9dc 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -202,9 +202,8 @@ static void dwxgmac2_map_mtl_to_dma(struct mac_device_info *hw, u32 queue, void __iomem *ioaddr = hw->pcsr; u32 value, reg; - reg = (queue < 4) ? XGMAC_MTL_RXQ_DMA_MAP0 : XGMAC_MTL_RXQ_DMA_MAP1; - if (queue >= 4) - queue -= 4; + reg = XGMAC_MTL_RXQ_DMA_MAP0 + (queue & ~0x3); + queue &= 0x3; value = readl(ioaddr + reg); value &= ~XGMAC_QxMDMACH(queue); diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index ef67dba775d0..11671fd6adee 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -15,9 +15,9 @@ #include #include -#define MTL_MAX_RX_QUEUES 8 -#define MTL_MAX_TX_QUEUES 8 -#define STMMAC_CH_MAX 8 +#define MTL_MAX_RX_QUEUES 16 +#define MTL_MAX_TX_QUEUES 16 +#define STMMAC_CH_MAX 16 #define STMMAC_RX_COE_NONE 0 #define STMMAC_RX_COE_TYPE1 1 -- 2.40.1