]> git.baikalelectronics.ru Git - kernel.git/commit
net: ftmac100: set max_mtu to allow DSA overhead setting
authorSergei Antonov <saproj@gmail.com>
Sun, 21 Aug 2022 16:08:44 +0000 (19:08 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 23 Aug 2022 22:30:58 +0000 (15:30 -0700)
commitb2dab48fa8d792f3082c93b68af7d13b8be68a71
tree536e1944ce1e9c98a3156180159cfa42725f9925
parent500b06d772ff2dfaac3370bb12bac401693a23bb
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>
drivers/net/ethernet/faraday/ftmac100.c