diff options
author | David S. Miller <davem@davemloft.net> | 2020-04-14 16:33:26 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-14 16:33:26 -0700 |
commit | 047c7308ea09e69875302bacbba711b5a154b609 (patch) | |
tree | 6f64bee195b93659e90e5cf2b4e6f8f45473a54c /net/dsa/port.c | |
parent | bec8141a17b1af160aa9ff652a74f69ef31f48c7 (diff) | |
parent | 3be98b2d5fbca3da7c4df0477eed95bfb5b83d64 (diff) |
Merge branch 'mv88e6xxx-fixed-link-fixes'
Andrew Lunn says:
====================
mv88e6xxx fixed link fixes
Recent changes for how the MAC is configured broke fixed links, as
used by CPU/DSA ports, and for SFPs when phylink cannot be used. The
first fix is unchanged from v1. The second fix takes a different
solution than v1. If a CPU or DSA port is known to have a PHYLINK
instance, configure the port down before instantiating the PHYLINK, so
it is in the down state as expected by PHYLINK.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/port.c')
-rw-r--r-- | net/dsa/port.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c index 231b2d494f1c..a58fdd362574 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -670,11 +670,16 @@ int dsa_port_link_register_of(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; struct device_node *phy_np; + int port = dp->index; if (!ds->ops->adjust_link) { phy_np = of_parse_phandle(dp->dn, "phy-handle", 0); - if (of_phy_is_fixed_link(dp->dn) || phy_np) + if (of_phy_is_fixed_link(dp->dn) || phy_np) { + if (ds->ops->phylink_mac_link_down) + ds->ops->phylink_mac_link_down(ds, port, + MLO_AN_FIXED, PHY_INTERFACE_MODE_NA); return dsa_port_phylink_register(dp); + } return 0; } |