[openwrt/openwrt] ipq806x: fix missing tx/rx fifo depth gmac configuration

LEDE Commits lede-commits at lists.infradead.org
Thu May 6 22:06:02 PDT 2021


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4cd43af0dea98d21611d20233ac77c2d0fe3af29

commit 4cd43af0dea98d21611d20233ac77c2d0fe3af29
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Thu Apr 8 16:47:33 2021 +0200

    ipq806x: fix missing tx/rx fifo depth gmac configuration
    
    tx/rx-fifo-depth is required to set mtu to the gmac. Backport upstream patch.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 ....13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch | 101 +++++++++++++++++++++
 1 file changed, 101 insertions(+)

diff --git a/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch b/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch
new file mode 100644
index 0000000000..1da9e7e2b3
--- /dev/null
+++ b/target/linux/ipq806x/patches-5.10/106-5.13-net-stmmac-Set-FIFO-sizes-for-ipq806x.patch
@@ -0,0 +1,101 @@
+From patchwork Sat Mar 13 13:18:26 2021
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Jonathan McDowell <noodles at earth.li>
+X-Patchwork-Id: 12136795
+X-Patchwork-Delegate: kuba at kernel.org
+Return-Path: <netdev-owner at kernel.org>
+X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
+	aws-us-west-2-korg-lkml-1.web.codeaurora.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID,
+	DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH,
+	MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1
+	autolearn=unavailable autolearn_force=no version=3.4.0
+Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
+	by smtp.lore.kernel.org (Postfix) with ESMTP id 90AB7C433DB
+	for <netdev at archiver.kernel.org>; Sat, 13 Mar 2021 14:03:56 +0000 (UTC)
+Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
+	by mail.kernel.org (Postfix) with ESMTP id 58E0464F18
+	for <netdev at archiver.kernel.org>; Sat, 13 Mar 2021 14:03:56 +0000 (UTC)
+Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
+        id S233791AbhCMODW (ORCPT <rfc822;netdev at archiver.kernel.org>);
+        Sat, 13 Mar 2021 09:03:22 -0500
+Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52042 "EHLO
+        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+        with ESMTP id S233478AbhCMOCx (ORCPT
+        <rfc822;netdev at vger.kernel.org>); Sat, 13 Mar 2021 09:02:53 -0500
+X-Greylist: delayed 2658 seconds by postgrey-1.37 at
+ lindbergh.monkeyblade.net; Sat, 13 Mar 2021 06:02:53 PST
+Received: from the.earth.li (the.earth.li
+ [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d])
+        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE3FC061574;
+        Sat, 13 Mar 2021 06:02:53 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li;
+         s=the;
+ h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Sender:
+        Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
+        Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
+        In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
+        List-Post:List-Owner:List-Archive;
+        bh=QOTdjy1PdYeDQ1fUENDrh0RtMG0coACWNQ4YsZbgl5w=;
+ b=DeTr+9knNkPOvtIi2OlW73HS3t
+        slxWRqQmC/Qd+tyDE8Lnj4oD+NFf5isDoaYYYhiPQ8iT/IOWEUz6DODzLTEBHd1WG9KYfSqzwFT70
+        7pdoIUdBZOPtb0r/1WZqZHRog4L3uDDlSBHRkO6SaLFE0zu6nunAVePrw4XLLmC9bJGsxaEmVvJ4N
+        zAgW5ejJ2lWOVgTIKSiBHTnLvkLbkSUT3inboIq/iEhEMGyBD8Zio1md1EU+8pQugFxwTmI5hqZ8M
+        RBYRHIUBaaivkhOJptSZm3vns90mjlM/uDY69gA+jRAsvt2mhWRHSwLv8PJUZ5sB0SenvC1WcPH1S
+        zAB6oEag==;
+Received: from noodles by the.earth.li with local (Exim 4.92)
+        (envelope-from <noodles at earth.li>)
+        id 1lL49y-0004kB-SB; Sat, 13 Mar 2021 13:18:26 +0000
+Date: Sat, 13 Mar 2021 13:18:26 +0000
+From: Jonathan McDowell <noodles at earth.li>
+To: Giuseppe Cavallaro <peppe.cavallaro at st.com>,
+        Alexandre Torgue <alexandre.torgue at st.com>,
+        Jose Abreu <joabreu at synopsys.com>,
+        David Miller <davem at davemloft.net>,
+        Jakub Kicinski <kuba at kernel.org>,
+        Maxime Coquelin <mcoquelin.stm32 at gmail.com>,
+        netdev at vger.kernel.org, linux-stm32 at st-md-mailman.stormreply.com,
+        linux-arm-kernel at lists.infradead.org, linux-kernel at vger.kernel.org
+Subject: [PATCH net-next] net: stmmac: Set FIFO sizes for ipq806x
+Message-ID: <20210313131826.GA17553 at earth.li>
+MIME-Version: 1.0
+Content-Disposition: inline
+User-Agent: Mutt/1.10.1 (2018-07-13)
+Precedence: bulk
+List-ID: <netdev.vger.kernel.org>
+X-Mailing-List: netdev at vger.kernel.org
+X-Patchwork-Delegate: kuba at kernel.org
+
+Commit eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values")
+started using the TX FIFO size to verify what counts as a valid MTU
+request for the stmmac driver.  This is unset for the ipq806x variant.
+Looking at older patches for this it seems the RX + TXs buffers can be
+up to 8k, so set appropriately.
+
+(I sent this as an RFC patch in June last year, but received no replies.
+I've been running with this on my hardware (a MikroTik RB3011) since
+then with larger MTUs to support both the internal qca8k switch and
+VLANs with no problems. Without the patch it's impossible to set the
+larger MTU required to support this.)
+
+Signed-off-by: Jonathan McDowell <noodles at earth.li>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+index bf3250e0e59c..749585fe6fc9 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+@@ -352,6 +352,8 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
+ 	plat_dat->bsp_priv = gmac;
+ 	plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed;
+ 	plat_dat->multicast_filter_bins = 0;
++	plat_dat->tx_fifo_size = 8192;
++	plat_dat->rx_fifo_size = 8192;
+ 
+ 	err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
+ 	if (err)



More information about the lede-commits mailing list