Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2029431rdb; Thu, 17 Aug 2023 08:46:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1GDADgS9cfvDUdfK/PHqlO9EoJDTYsYtII1k7iMIq4GSEHd2Dvg9QQmiWruaKLEeKPGrs X-Received: by 2002:a17:90a:588f:b0:268:5919:a276 with SMTP id j15-20020a17090a588f00b002685919a276mr4497971pji.20.1692287210025; Thu, 17 Aug 2023 08:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692287210; cv=none; d=google.com; s=arc-20160816; b=PUKPDy8udHeBbPUiP/2QC0Of/l8U/0j4quYkkzY6izxOz6GM5c0kc48sWnPe+Li3U0 meErZefe7z9D6A8ssGOhNt2VR/Cg27hPghzKygzXjrVEQGvNi4z8GvXjQyZUgq9ReJr+ hBm8qmqbbsI9jJFcoOFcWCB/YjBv2EdWXvYi59RwiDjBuCvl2ErpNd6VTyPHCYChjdxi nUBnAPWAeAibBmiZ/WV53lrer9vjUBlKlh7tg2UrbZ6a/Y2oI2pL4R/I/MVemvg028qC ITQrgsnVX4zbTf5HPktwWvI9vUhEIGU9rfu/wjJhpgud5JdlhtkSZUCkoNze0MdaQ6+x Uvuw== 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=9ZEmEbW+IEKEui9H2ckn7YqdLrY6JdO+v9GOiCwksZw=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=u7e4tdc0D4s2EyAIGyvbqfA6jz6FaMwMxnfdmlea+2oRDnloqlcB7QjEFb8aoekWM9 G2IdRxpKR+k+me0ShrJaXgA+6PLvAgYGcU165JvOU6TQhJmg00Lylr5Puz8FH0ZwoYg8 6m/lhsKXmmooPrfo8ce+Ej1IOEffLSHGQd7jvg10I5F8qBORFPF9TvgYlWg5uKbrbghu 6pEukOzwN91buqKWxZxc8m7IoRfXUflJz1ybWAu3V4zhZS1Kg1McwPuoVGPo3H4EXR66 AWy768NKxEwv54KLnqZwL7BtElBKAqM7lhqKSVwf5bkhhdnMbPcXy8YOisKyoSpYxmmK FrNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Idw8nBH3; 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 gx15-20020a17090b124f00b002632c1fc68dsi1702759pjb.72.2023.08.17.08.46.36; Thu, 17 Aug 2023 08:46:50 -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=Idw8nBH3; 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 S1344262AbjHPPlo (ORCPT + 99 others); Wed, 16 Aug 2023 11:41:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344220AbjHPPl0 (ORCPT ); Wed, 16 Aug 2023 11:41:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E369C26A6; Wed, 16 Aug 2023 08:41:25 -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 7CB5262399; Wed, 16 Aug 2023 15:41:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FB9FC433C7; Wed, 16 Aug 2023 15:41:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692200484; bh=txwgc7mnnsmcD2eGCJ5tky3C5uEWpaD5DMyct9tbf5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Idw8nBH3ufcz1hDSmcG2WbpHUhGAiI6pvqX38a6xog1CwntcfQ4+AP2a4zOb2zcCP 1rHM36XZKHDVUgIlBSg9vf+mdcESOAZZWmISsMwod+8P0pzhOT24Vk0Ej6lxcM3Msn cbRAVSEVnkpu5kkvSwxsZjJ+YR1Jm6+c7N20mluxk/wYtYykE9H5HmrBt3QfuujV8r 3yO31F7chLeFdiLRBEw33l3zXwrDDjr021rqqJ5TyhhaBjSEbcNncvHWVNdW6K16T7 j4LkUEZx4+OTRlFyL5KDRsCVwX8qnuJozRRhbiKjFMvy//XUzOENWUbLPM7jyKKzBn VZf3TybluMATA== 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 v4 3/9] net: stmmac: enlarge max rx/tx queues and channels to 16 Date: Wed, 16 Aug 2023 23:29:20 +0800 Message-Id: <20230816152926.4093-4-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230816152926.4093-1-jszhang@kernel.org> References: <20230816152926.4093-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Acked-by: Alexandre TORGUE --- 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 38782662ff98..8ac994553bc1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -232,9 +232,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 784277d666eb..9c90e2e295d4 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