Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: mv88e6xxx: fix usable ports on 88e6020

The switch has 4 ports with 2 internal PHYs, but ports are numbered up
to 6, with ports 0, 1, 5 and 6 being usable.

Fixes: 71d94a432a15 ("net: dsa: mv88e6xxx: add support for MV88E6020 switch")
Signed-off-by: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240326123655.40666-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Michael Krummsdorf and committed by
Jakub Kicinski
625aefac 09ba28e1

+5 -1
+5 -1
drivers/net/dsa/mv88e6xxx/chip.c
··· 5503 5503 .family = MV88E6XXX_FAMILY_6250, 5504 5504 .name = "Marvell 88E6020", 5505 5505 .num_databases = 64, 5506 - .num_ports = 4, 5506 + /* Ports 2-4 are not routed to pins 5507 + * => usable ports 0, 1, 5, 6 5508 + */ 5509 + .num_ports = 7, 5507 5510 .num_internal_phys = 2, 5511 + .invalid_port_mask = BIT(2) | BIT(3) | BIT(4), 5508 5512 .max_vid = 4095, 5509 5513 .port_base_addr = 0x8, 5510 5514 .phy_base_addr = 0x0,