diff options
author | 2022-03-08 14:58:57 +0100 | |
---|---|---|
committer | 2022-03-09 19:47:18 -0800 | |
commit | e18058ea99860321851f7e76b8de4a7a4b06f5ed (patch) | |
tree | b0f34e6eab9f21fa1c305c62fc1ed757292b72f2 /drivers/net/dsa/microchip/ksz_common.h | |
parent | drivers: vxlan: fix returnvar.cocci warning (diff) | |
download | wireguard-linux-e18058ea99860321851f7e76b8de4a7a4b06f5ed.tar.xz wireguard-linux-e18058ea99860321851f7e76b8de4a7a4b06f5ed.zip |
net: dsa: microchip: ksz9477: implement MTU configuration
This chips supports two ways to configure max MTU size:
- by setting SW_LEGAL_PACKET_DISABLE bit: if this bit is 0 allowed packed size
will be between 64 and bytes 1518. If this bit is 1, it will accept
packets up to 2000 bytes.
- by setting SW_JUMBO_PACKET bit. If this bit is set, the chip will
ignore SW_LEGAL_PACKET_DISABLE value and use REG_SW_MTU__2 register to
configure MTU size.
Current driver has disabled SW_JUMBO_PACKET bit and activates
SW_LEGAL_PACKET_DISABLE. So the switch will pass all packets up to 2000 without
any way to configure it.
By providing port_change_mtu we are switch to SW_JUMBO_PACKET way and will
be able to configure MTU up to ~9000.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20220308135857.1119028-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 4ff0a159ce3c..fa39ee73cbd2 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -41,6 +41,7 @@ struct ksz_port { struct ksz_port_mib mib; phy_interface_t interface; + u16 max_frame; }; struct ksz_device { |