linux/drivers/net/dsa/microchip
Marek Vasut c369d7fc8f net: dsa: microchip: ksz8795: Fix KSZ8794 port map again
The KSZ8795 switch has 4 external ports {0,1,2,3} and 1 CPU port {4}, so
does the KSZ8765. The KSZ8794 seems to be repackaged KSZ8795 with different
ID and port 3 not routed out, however the port 3 registers are present in
the silicon, so the KSZ8794 switch has 3 external ports {0,1,2} and 1 CPU
port {4}. Currently the driver always uses the last port as CPU port, on
KSZ8795/KSZ8765 that is port 4 and that is OK, but on KSZ8794 that is port
3 and that is not OK, as it must also be port 4.

This patch adjusts the driver such that it always registers a switch with
5 ports total (4 external ports, 1 CPU port), always sets the CPU port to
switch port 4, and then configures the external port mask according to
the switch model -- 3 ports for KSZ8794 and 4 for KSZ8795/KSZ8765.

Fixes: 68a1b676db ("net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment")
Fixes: 4ce2a984ab ("net: dsa: microchip: ksz8795: use phy_port_cnt where possible")
Fixes: 241ed719bc ("net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210120001045.488506-1-marex@denx.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-20 20:50:49 -08:00
..
Kconfig
ksz8795.c net: dsa: microchip: ksz8795: Fix KSZ8794 port map again 2021-01-20 20:50:49 -08:00
ksz8795_reg.h net: dsa: microchip: ksz8795: use num_vlans where possible 2020-12-02 17:16:29 -08:00
ksz8795_spi.c
ksz9477.c net: dsa: microchip: remove usage of mib_port_count 2020-12-02 17:16:29 -08:00
ksz9477_i2c.c
ksz9477_reg.h
ksz9477_spi.c
ksz_common.c net: dsa: microchip: ksz8795: Fix KSZ8794 port map again 2021-01-20 20:50:49 -08:00
ksz_common.h net: dsa: microchip: remove usage of mib_port_count 2020-12-02 17:16:29 -08:00
Makefile