I've been hacking on a espressobin board to try to improve ptp support,
etc. However, I have
a big problem with link detection on the wan, lan0 and lan1 ports.
I have a standard bridge configuration using systemd-networkd.
Currently, I'm working with linux
v4.20.2.
From power on, none of the wan, lan0, lan1 or br0 achieve link
(LOWER_UP). networkctl shows
no carrier for these ports. Disconnecting and reconnecting cables is
not detected and makes no
difference to link state. I added a debug printout in
mv88e6352_port_link_state, but the routine
is not called. As far as I can tell, link state changes are not
detected using PHY interrupts. And yet,
if the card is rebooted, link detection seems to magically work.
I know that the 88E6341 port registers detect port link (also RJ45 LED)
correctly.
The attached patch fixes link detection at power on. However, link
state still doesn't update if a cable
is disconnected or moved.
I'm puzzled as to how this is supposed to work. Thoughts?
Regards,
Dave Anglin
--
John David Anglin [email protected]
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 9b8dd0d0ee42..c1ec13b320ee 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -405,6 +405,7 @@ static void phylink_resolve(struct work_struct *w)
case MLO_AN_PHY:
link_state = pl->phy_state;
phylink_resolve_flow(pl, &link_state);
+ phylink_get_mac_state(pl, &link_state);
phylink_mac_config(pl, &link_state);
break;