Commit 2b6fd3ea authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

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: default avatarMichal Vokáč <michal.vokac@ysoft.com>
Fixes: 0394a63a ("net: dsa: enable and disable all ports")
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarMichal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 159d2c7d
...@@ -936,6 +936,9 @@ qca8k_port_enable(struct dsa_switch *ds, int port, ...@@ -936,6 +936,9 @@ qca8k_port_enable(struct dsa_switch *ds, int port,
{ {
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; 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); qca8k_port_set_status(priv, port, 1);
priv->port_sts[port].enabled = 1; priv->port_sts[port].enabled = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment