]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: Set max MTU size to allow the MTU to be changed
authorAndrew Lunn <andrew@lunn.ch>
Sat, 11 Jul 2020 20:32:06 +0000 (22:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Jul 2020 22:22:14 +0000 (15:22 -0700)
commit3795cae4f89f64c3aef28aab4c897149597f0917
tree6eb00fdb90a68d0b0d021c9891fc1355f7dadd1a
parent2bcc5b433ae1d9245252a3f9bff046a531eb4ba6
net: fec: Set max MTU size to allow the MTU to be changed

The FEC allocates 2K buffers, but looses some of it due to
alignment. It can however support an MTU bigger than the default. This
is particularly interesting when used in combination with Ethernet
switches supporting DSA, which have extra headers. The DSA core will
try to increase the MTU to support these extra headers. If the max
size defaults to that of standard Ethernet we get a warning. By
setting the max to what the driver actually supports, we avoid this
warning.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c