]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.6/net-dsa-mv88e6xxx-fix-usable-ports-on-88e6020.patch
81d7862f7e77f63221ce8af20ffe6d722c5afe54
[thirdparty/kernel/stable-queue.git] / queue-6.6 / net-dsa-mv88e6xxx-fix-usable-ports-on-88e6020.patch
1 From 625aefac340f45a4fc60908da763f437599a0d6f Mon Sep 17 00:00:00 2001
2 From: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
3 Date: Tue, 26 Mar 2024 13:36:54 +0100
4 Subject: net: dsa: mv88e6xxx: fix usable ports on 88e6020
5
6 From: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
7
8 commit 625aefac340f45a4fc60908da763f437599a0d6f upstream.
9
10 The switch has 4 ports with 2 internal PHYs, but ports are numbered up
11 to 6, with ports 0, 1, 5 and 6 being usable.
12
13 Fixes: 71d94a432a15 ("net: dsa: mv88e6xxx: add support for MV88E6020 switch")
14 Signed-off-by: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
15 Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
16 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
17 Reviewed-by: Simon Horman <horms@kernel.org>
18 Link: https://lore.kernel.org/r/20240326123655.40666-1-matthias.schiffer@ew.tq-group.com
19 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 ---
22 drivers/net/dsa/mv88e6xxx/chip.c | 6 +++++-
23 1 file changed, 5 insertions(+), 1 deletion(-)
24
25 --- a/drivers/net/dsa/mv88e6xxx/chip.c
26 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
27 @@ -5386,8 +5386,12 @@ static const struct mv88e6xxx_info mv88e
28 .family = MV88E6XXX_FAMILY_6250,
29 .name = "Marvell 88E6020",
30 .num_databases = 64,
31 - .num_ports = 4,
32 + /* Ports 2-4 are not routed to pins
33 + * => usable ports 0, 1, 5, 6
34 + */
35 + .num_ports = 7,
36 .num_internal_phys = 2,
37 + .invalid_port_mask = BIT(2) | BIT(3) | BIT(4),
38 .max_vid = 4095,
39 .port_base_addr = 0x8,
40 .phy_base_addr = 0x0,