From patchwork Wed Aug 16 15:29:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 13355425 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89672C04A6A for ; Wed, 16 Aug 2023 15:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TZl949jRjog9sBBDQ33Uwddk63BSf7HkvwsFxelCyWg=; b=hPu29Xw4h5ig9q 8S3wbxqb1Z/wlSjem3T3wSoavsZsMkQ9nwuiNiV/8UORYCRavKvL4vcL+HC/Rx0VUNqS6zG4plFSN BTABOSIUL30CAs/V6mZqhSSbG5DhsTuB7KbQHpjHsvnta9u6quhbOVIERdtyzsqLj+jcSAJ5HamAM x+Q9IobHewzH/PxHbIrGgM1rISVxQwFN+0Bl4znMnUS7buZToUPoHI6ea3R30tNkqxf40FEyejpHU 9uHtQbq+8D/iH57O8y7wxRxZ4+gQyMiEM6PYg0T9fzhRaLQapR+svpP6CMpQgxVQTuSgBiDu52dYR hnn3NcrD02uJb+4/U7/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWIeI-004Vkv-1Q; Wed, 16 Aug 2023 15:41:30 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWIeE-004VjL-09 for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 15:41:27 +0000 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 83A7E647BB; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_084126_125304_3E394A73 X-CRM114-Status: GOOD ( 12.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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