summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53/b53_priv.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-09-05 19:23:28 +0200
committerDavid S. Miller <davem@davemloft.net>2021-09-05 19:02:38 +0100
commit63f8428b4077de3664eb0b252393c839b0b293ec (patch)
treeb418d42eb6054fc138e8568ca04bd0f9c5da698d /drivers/net/dsa/b53/b53_priv.h
parent8a0ed250f911da31a2aef52101bc707846a800ff (diff)
net: dsa: b53: Fix IMP port setup on BCM5301x
Broadcom's b53 switches have one IMP (Inband Management Port) that needs to be programmed using its own designed register. IMP port may be different than CPU port - especially on devices with multiple CPU ports. For that reason it's required to explicitly note IMP port index and check for it when choosing a register to use. This commit fixes BCM5301x support. Those switches use CPU port 5 while their IMP port is 8. Before this patch b53 was trying to program port 5 with B53_PORT_OVERRIDE_CTRL instead of B53_GMII_PORT_OVERRIDE_CTRL(5). It may be possible to also replace "cpu_port" usages with dsa_is_cpu_port() but that is out of the scope of thix BCM5301x fix. Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53/b53_priv.h')
-rw-r--r--drivers/net/dsa/b53/b53_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index 9bf8319342b0..5d068acf7cf8 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -123,6 +123,7 @@ struct b53_device {
/* used ports mask */
u16 enabled_ports;
+ unsigned int imp_port;
unsigned int cpu_port;
/* connect specific data */