Commit 55a4d2ea authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: b53: Also include SGMII for mac_config and mac_link_state

In both 802.3z and SGMII modes we need to configure the MAC accordingly
to flip between Fiber and SGMII modes, and we need to read the MAC
status from the SGMII in-band control word.

Fixes: 0e01491d ("net: dsa: b53: Add SerDes support")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2cae8c07
...@@ -1172,7 +1172,8 @@ int b53_phylink_mac_link_state(struct dsa_switch *ds, int port, ...@@ -1172,7 +1172,8 @@ int b53_phylink_mac_link_state(struct dsa_switch *ds, int port,
struct b53_device *dev = ds->priv; struct b53_device *dev = ds->priv;
int ret = -EOPNOTSUPP; int ret = -EOPNOTSUPP;
if (phy_interface_mode_is_8023z(state->interface) && if ((phy_interface_mode_is_8023z(state->interface) ||
state->interface == PHY_INTERFACE_MODE_SGMII) &&
dev->ops->serdes_link_state) dev->ops->serdes_link_state)
ret = dev->ops->serdes_link_state(dev, port, state); ret = dev->ops->serdes_link_state(dev, port, state);
...@@ -1195,7 +1196,8 @@ void b53_phylink_mac_config(struct dsa_switch *ds, int port, ...@@ -1195,7 +1196,8 @@ void b53_phylink_mac_config(struct dsa_switch *ds, int port,
return; return;
} }
if (phy_interface_mode_is_8023z(state->interface) && if ((phy_interface_mode_is_8023z(state->interface) ||
state->interface == PHY_INTERFACE_MODE_SGMII) &&
dev->ops->serdes_config) dev->ops->serdes_config)
dev->ops->serdes_config(dev, port, mode, state); dev->ops->serdes_config(dev, port, mode, state);
} }
......
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