Commit dc6c0bf
net: ethernet: cortina: Fix MTU max setting
The RX max frame size is over 10000 for the Gemini ethernet,
but the TX max frame size is actually just 2047 (0x7ff after
checking the datasheet). Reflect this in what we offer to Linux,
cap the MTU at the TX max frame minus ethernet headers.
We delete the code disabling the hardware checksum for large
MTUs as netdev->mtu can no longer be larger than
netdev->max_mtu meaning the if()-clause in gmac_fix_features()
is never true.
Fixes: 4d5ae32 ("net: ethernet: Add a driver for Gemini gigabit ethernet")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20231109-gemini-largeframe-fix-v4-3-6e611528db08@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent d4d0c5b commit dc6c0bf
2 files changed
Lines changed: 5 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2000 | 2000 | | |
2001 | 2001 | | |
2002 | 2002 | | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | 2003 | | |
2013 | 2004 | | |
2014 | 2005 | | |
| |||
2234 | 2225 | | |
2235 | 2226 | | |
2236 | 2227 | | |
2237 | | - | |
2238 | 2228 | | |
2239 | 2229 | | |
2240 | 2230 | | |
| |||
2486 | 2476 | | |
2487 | 2477 | | |
2488 | 2478 | | |
2489 | | - | |
2490 | | - | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
2491 | 2482 | | |
2492 | 2483 | | |
2493 | | - | |
| 2484 | + | |
2494 | 2485 | | |
2495 | 2486 | | |
2496 | 2487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| |||
0 commit comments