linux-stable/drivers/net/dsa/microchip
Rakesh Sankaranarayanan 807e5eda20 net: dsa: microchip: lan937x: fix maximum frame length check
Maximum frame length check is enabled in lan937x switch on POR, But it
is found to be disabled on driver during port setup operation. Due to
this, packets are not dropped when transmitted with greater than configured
value. For testing, setup made for lan1->lan2 transmission and configured
lan1 interface with a frame length (less than 1500 as mentioned in
documentation) and transmitted packets with greater than configured value.
Expected no packets at lan2 end, but packets observed at lan2.

Based on the documentation, packets should get discarded if the actual
packet length doesn't match the frame length configured. Frame length check
should be disabled only for cascaded ports due to tailtags.

This feature was disabled on ksz9477 series due to ptp issue, which is
not in lan937x series. But since lan937x took ksz9477 as base, frame
length check disabled here as well. Patch added to remove this portion
from port setup so that maximum frame length check will be active for
normal ports.

Fixes: 55ab6ffaf3 ("net: dsa: microchip: add DSA support for microchip LAN937x")
Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
Link: https://lore.kernel.org/r/20220912051228.1306074-1-rakesh.sankaranarayanan@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-09-20 12:01:51 +02:00
..
Kconfig net: dsa: microchip: add DSA support for microchip LAN937x 2022-07-02 16:34:05 +01:00
ksz8.h net: dsa: microchip: remove the struct ksz8 2022-06-29 13:47:59 +01:00
ksz8795.c net: dsa: microchip: add support for phylink mac config 2022-07-27 09:39:17 +01:00
ksz8795_reg.h net: dsa: microchip: ksz8795: use common xmii function 2022-07-27 09:39:17 +01:00
ksz8863_smi.c net: dsa: microchip: remove the struct ksz8 2022-06-29 13:47:59 +01:00
ksz9477.c net: dsa: microchip: ksz9477: fix fdb_dump last invalid entry 2022-08-17 12:09:01 -07:00
ksz9477.h net: dsa: microchip: move ksz_dev_ops to ksz_common.c 2022-06-24 11:31:44 +01:00
ksz9477_i2c.c net: dsa: microchip: remove the ksz8/ksz9477_switch_register 2022-06-24 11:31:44 +01:00
ksz9477_reg.h net: dsa: microchip: ksz9477: use common xmii function 2022-07-27 09:39:17 +01:00
ksz_common.c net: dsa: microchip: fix kernel oops on ksz8 switches 2022-09-03 10:42:10 +01:00
ksz_common.h net: dsa: microchip: make learning configurable and keep it off while standalone 2022-08-23 14:36:56 -07:00
ksz_spi.c net: dsa: microchip: fix Clang -Wunused-const-variable warning on 'ksz_dt_ids' 2022-07-18 11:29:30 +01:00
lan937x.h net: dsa: microchip: add support for phylink mac config 2022-07-27 09:39:17 +01:00
lan937x_main.c net: dsa: microchip: lan937x: fix maximum frame length check 2022-09-20 12:01:51 +02:00
lan937x_reg.h net: dsa: microchip: apply rgmii tx and rx delay in phylink mac config 2022-07-27 09:39:17 +01:00
Makefile net: dsa: microchip: add DSA support for microchip LAN937x 2022-07-02 16:34:05 +01:00