From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 E259BC433ED for ; Wed, 5 May 2021 17:11:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABB1661157 for ; Wed, 5 May 2021 17:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238843AbhEERJu (ORCPT ); Wed, 5 May 2021 13:09:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:47626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237525AbhEERAf (ORCPT ); Wed, 5 May 2021 13:00:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FD37619B9; Wed, 5 May 2021 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620232811; bh=vI5LWT6H714BA7fXwBiqMpEcxeof87DXV4W9TPRXmZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XSmolPgMAoQCaEqCR9v2vDeA3qRhdsrOg5y5BNZqeZ1c095AHZPtAu21UzrB4ZCsC q5zHa2vhnhx+GI3naOzOSYrhoojKnP3oQj0NxbZ0A3wJqJP7Epkw65ntNgta44WJAC uAI0Q0euaH5MTha3mwh6Om0ge/JA38dUARJmyJTyet0YkwkFXZFAbNIMo/dgZcG10/ KUrHn/90WmN7z+vmecCB4NA7lJUJSap/toJwms9/T8F1O91sQp2xlIxQnAkkVhxl60 BPY5xjaGvb56jC38aaq34aboFIdQbyFPU8nlQUTX2+2wMQKKOlyGRNZm3W/GHFcijb 3EAYaMcjiDgDA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jonathan McDowell , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 04/32] net: stmmac: Set FIFO sizes for ipq806x Date: Wed, 5 May 2021 12:39:36 -0400 Message-Id: <20210505164004.3463707-4-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210505164004.3463707-1-sashal@kernel.org> References: <20210505164004.3463707-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan McDowell [ Upstream commit e127906b68b49ddb3ecba39ffa36a329c48197d3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 826626e870d5..0f56f8e33691 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c @@ -351,6 +351,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) -- 2.30.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 BAAF9C433ED for ; Wed, 5 May 2021 16:58:20 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84E17610A7 for ; Wed, 5 May 2021 16:58:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84E17610A7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=qa8ldshkXy/5I1XXzzvOLv8dL7aHv8aZmHKEnKiWmvA=; b=EmmKk/eCLMnk+oRX3m7NRTeSY ltlREu1UVLabnCI+dXAFTzIzO5hMIz8QOPARL+2ZUP3rV5khaMtXDcIGCiw2HMp6x0RY7hKR5vq6g zuckfYZf/JPPUmoP80/yotqHEX+EdSiIhc/Z5nDgt7rPB8ZkPZIAjN1rR05mVTElg8q7gBHGrsBBC cFDf8i7QzDsFTuUzsNNnxV8COgQS4AuKd5bVMQh/wSb8z5IaXAqlBKVeuez9e6LTwiTkcCAf55Eyv VM1HjGCr/WxszvkG6nU490bQxQR0rmRTD5H6aNccTRCgDkKmMo/5czWennrt1CF6cV7HyBD7alHvR 9Y+twCXyQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leKpd-001nw8-Ox; Wed, 05 May 2021 16:57:06 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leKZK-001hf6-3e for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 16:40:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=sJriAV+DsbvrQB4xr/pDfrcbFid6xhU8WibTvVckD+k=; b=Sm7LhsHq1gGmonQzqy9xKkWcI3 b1uMTH1NkPdIJz3F/d+jjs+nKUPmFUnIKoXEEWJ8DQdFZAnDU3oE7zCLYDrNk62acNtE7wcKvLsbG CvFVO0sDEdLiAX2Cfjeqk0siDIIJQgWUrpXJwSYG0er03ZM2vQS5NQXezBuT3D9Axl8MbTOqJ+Lkv WtfzsH6++thp1VDEKM/xwiiEZ9yPuCTtb3/jbXrATgsuwITHRBVGzHmWvbJ96hxISa+CchiPJJOmk AESjgxKE9tZ7v7OnGZXkI/KJS/AqJ/QTgUBAns8FgDU0GkE0S3yXSIguJHKzUBV6dE7f6ymdyPqVo GMUH1jMA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leKZH-004y6w-GZ for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 16:40:12 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FD37619B9; Wed, 5 May 2021 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620232811; bh=vI5LWT6H714BA7fXwBiqMpEcxeof87DXV4W9TPRXmZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XSmolPgMAoQCaEqCR9v2vDeA3qRhdsrOg5y5BNZqeZ1c095AHZPtAu21UzrB4ZCsC q5zHa2vhnhx+GI3naOzOSYrhoojKnP3oQj0NxbZ0A3wJqJP7Epkw65ntNgta44WJAC uAI0Q0euaH5MTha3mwh6Om0ge/JA38dUARJmyJTyet0YkwkFXZFAbNIMo/dgZcG10/ KUrHn/90WmN7z+vmecCB4NA7lJUJSap/toJwms9/T8F1O91sQp2xlIxQnAkkVhxl60 BPY5xjaGvb56jC38aaq34aboFIdQbyFPU8nlQUTX2+2wMQKKOlyGRNZm3W/GHFcijb 3EAYaMcjiDgDA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jonathan McDowell , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 04/32] net: stmmac: Set FIFO sizes for ipq806x Date: Wed, 5 May 2021 12:39:36 -0400 Message-Id: <20210505164004.3463707-4-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210505164004.3463707-1-sashal@kernel.org> References: <20210505164004.3463707-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_094011_583829_3EA5F86D X-CRM114-Status: GOOD ( 12.72 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jonathan McDowell [ Upstream commit e127906b68b49ddb3ecba39ffa36a329c48197d3 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 826626e870d5..0f56f8e33691 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c @@ -351,6 +351,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) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel