net: dsa: qca8k: Fix port enable for CPU port
Subsystems (3)
Andrew Lunn
maintainerPATCH 1/1 net: dsa: qca8k: Fix port enable for CPU port
The CPU port does not have a PHY connected to it. So calling phy_support_asym_pause() results in an Opps. As with other DSA drivers, add a guard that the port is a user port.
Reported-by Michal Vokáč <[email protected]>
Fixes 0394a63acfe2 ("net: dsa: enable and disable all ports")
Signed-off-by Andrew Lunn <[email protected]>
--- drivers/net/dsa/qca8k.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/dsa/qca8k.c +3 -0
@@ -936,6 +936,9 @@ qca8k_port_enable(struct dsa_switch *ds, int port, {struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; +if (!dsa_is_user_port (ds, port)) +return 0 ; +qca8k_port_set_status (priv, port,1 ); priv->port_sts[port].enabled =1 ;
Signature · 1 line
2.23.0
Quoted 5 lines · Andrew Lunn
The CPU port does not have a PHY connected to it. So calling
phy_support_asym_pause()results in an Opps. As with other DSA drivers, add a guard that the port is a user port.Reported-by Michal Vokáč <[email protected]>
Thank you for the prompt fix Andrew!
Tested-by Michal Vokáč <[email protected]>
Quoted 21 lines
Fixes 0394a63acfe2 ("net: dsa: enable and disable all ports")Signed-off-by Andrew Lunn <[email protected]>--- drivers/net/dsa/qca8k.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/dsa/qca8k.c +3
-0@@ -936,6 +936,9 @@ qca8k_port_enable(struct dsa_switch *ds, int port, {struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; +if (!dsa_is_user_port (ds, port)) +return 0 ; +qca8k_port_set_status (priv, port,1 ); priv->port_sts[port].enabled =1 ;
From: Andrew Lunn <[email protected]>
Date: Wed, 25 Sep 2019 02:47:07 +0200
Quoted 7 lines
The CPU port does not have a PHY connected to it. So calling
phy_support_asym_pause()results in an Opps. As with other DSA drivers, add a guard that the port is a user port.Reported-by Michal Vokáč <[email protected]>Fixes 0394a63acfe2 ("net: dsa: enable and disable all ports")Signed-off-by Andrew Lunn <[email protected]>
Applied.