netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jonathan McDowell <noodles@earth.li>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 5.4 04/46] net: stmmac: Set FIFO sizes for ipq806x
Date: Wed,  5 May 2021 12:38:14 -0400	[thread overview]
Message-ID: <20210505163856.3463279-4-sashal@kernel.org> (raw)
In-Reply-To: <20210505163856.3463279-1-sashal@kernel.org>

From: Jonathan McDowell <noodles@earth.li>

[ 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 <noodles@earth.li>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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


  parent reply	other threads:[~2021-05-05 17:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210505163856.3463279-1-sashal@kernel.org>
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 02/46] tipc: convert dest node's address to network order Sasha Levin
2021-05-05 16:38 ` Sasha Levin [this message]
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 11/46] Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 12/46] Bluetooth: verify AMP hci_chan before amp_destroy Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 13/46] Bluetooth: initialize skb_queue_head at l2cap_chan_create() Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 14/46] net: bridge: when suppression is enabled exclude RARP packets Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 15/46] Bluetooth: check for zapped sk before connecting Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 16/46] ip6_vti: proper dev_{hold|put} in ndo_[un]init methods Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 19/46] mac80211: clear the beacon's CRC after channel switch Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 21/46] mt76: mt76x0: disable GTK offloading Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 27/46] selftests: Set CC to clang in lib.mk if LLVM is set Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 30/46] sctp: Fix out-of-bounds warning in sctp_process_asconf_param() Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 31/46] flow_dissector: Fix out-of-bounds warning in __skb_flow_bpf_to_target() Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 34/46] ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user() Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 35/46] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 36/46] samples/bpf: Fix broken tracex1 due to kprobe argument change Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 39/46] wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 40/46] wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 41/46] qtnfmac: Fix possible buffer overflow in qtnf_event_handle_external_auth Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 43/46] iavf: remove duplicate free resources calls Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 44/46] net: ethernet: mtk_eth_soc: fix RX VLAN offload Sasha Levin
2021-05-05 16:38 ` [PATCH AUTOSEL 5.4 45/46] bnxt_en: Add PCI IDs for Hyper-V VF devices Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210505163856.3463279-4-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=netdev@vger.kernel.org \
    --cc=noodles@earth.li \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).