diff options
author | Sergei Antonov <saproj@gmail.com> | 2022-08-21 18:08:44 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-24 00:30:58 +0200 |
commit | 6c2c782fa0131a091a52bd0b75083fb24c28b6d3 (patch) | |
tree | 536e1944ce1e9c98a3156180159cfa42725f9925 /drivers/net/ethernet/faraday | |
parent | Merge branch 'dsa-changes-for-multiple-cpu-ports-part-3' (diff) | |
download | linux-6c2c782fa0131a091a52bd0b75083fb24c28b6d3.tar.xz linux-6c2c782fa0131a091a52bd0b75083fb24c28b6d3.zip |
net: ftmac100: set max_mtu to allow DSA overhead setting
In case ftmac100 is used with a DSA switch, Linux wants to set MTU
to 1504 to accommodate for DSA overhead. With the default max_mtu
it leads to the error message:
ftmac100 92000000.mac eth0: error -22 setting MTU to 1504 to include DSA overhead
ftmac100 supports packet length 1518 (MAX_PKT_SIZE constant), so it is
safe to report it in max_mtu.
Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220821160844.474277-1-saproj@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/faraday')
-rw-r--r-- | drivers/net/ethernet/faraday/ftmac100.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c index 8a341e2d5833..2e6524009b19 100644 --- a/drivers/net/ethernet/faraday/ftmac100.c +++ b/drivers/net/ethernet/faraday/ftmac100.c @@ -1075,6 +1075,7 @@ static int ftmac100_probe(struct platform_device *pdev) SET_NETDEV_DEV(netdev, &pdev->dev); netdev->ethtool_ops = &ftmac100_ethtool_ops; netdev->netdev_ops = &ftmac100_netdev_ops; + netdev->max_mtu = MAX_PKT_SIZE; platform_set_drvdata(pdev, netdev); |