mirror of
https://github.com/armbian/build.git
synced 2025-08-09 12:46:58 +02:00
- materialized overwrites: - `add-board-helios64.patch` - `add-board-orangepi-r1-plus.patch` - `add-driver-for-Motorcomm-YT85xx+PHYs.patch` - `add-board-rk3328-roc-pc.patch` - not touched: wifi patches, those still require work before rebase is consistent. - `wifi-4003-uwe5622-adjust-for-rockchip.patch` - this patch is done on top of the wifi drivers patches exclusively, and fails to apply out of tree. - we should probably consider moving this into the wifi drivers patch harness, not in the rockchip tree.
52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
Date: Wed, 21 Jul 2021 20:59:39 +0000
|
|
Subject: Disable MTU validation
|
|
|
|
This patch reverts: https://github.com/torvalds/linux/commit/eaf4fac478077d4ed57cbca2c044c4b58a96bd98
|
|
|
|
It works around following issues:
|
|
- no way to change MTU (tx_fifo_size is reported as 0 for Rockchip's dwmac)
|
|
|
|
Signed-off-by: Piotr Szczepanik <piter75@gmail.com>
|
|
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
---
|
|
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 ----------
|
|
1 file changed, 12 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
index d7fcab057032..ce8467d6ea02 100644
|
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
@@ -5575,27 +5575,15 @@ static void stmmac_set_rx_mode(struct net_device *dev)
|
|
static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
|
|
{
|
|
struct stmmac_priv *priv = netdev_priv(dev);
|
|
- int txfifosz = priv->plat->tx_fifo_size;
|
|
struct stmmac_dma_conf *dma_conf;
|
|
const int mtu = new_mtu;
|
|
int ret;
|
|
|
|
- if (txfifosz == 0)
|
|
- txfifosz = priv->dma_cap.tx_fifo_size;
|
|
-
|
|
- txfifosz /= priv->plat->tx_queues_to_use;
|
|
-
|
|
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
|
|
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
|
|
return -EINVAL;
|
|
}
|
|
|
|
- new_mtu = STMMAC_ALIGN(new_mtu);
|
|
-
|
|
- /* If condition true, FIFO is too small or MTU too large */
|
|
- if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
|
|
- return -EINVAL;
|
|
-
|
|
if (netif_running(dev)) {
|
|
netdev_dbg(priv->dev, "restarting interface to change its MTU\n");
|
|
/* Try to allocate the new DMA conf with the new mtu */
|
|
--
|
|
Armbian
|
|
|