All of lore.kernel.org
 help / color / mirror / Atom feed
* net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs
@ 2019-01-22 19:16 John David Anglin
  2019-01-22 20:28 ` Andrew Lunn
  2019-01-22 23:12 ` net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Andrew Lunn
  0 siblings, 2 replies; 52+ messages in thread
From: John David Anglin @ 2019-01-22 19:16 UTC (permalink / raw)
  To: Russell King; +Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, netdev

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

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  dave.anglin@bell.net


[-- Attachment #2: phylink.c.d --]
[-- Type: text/plain, Size: 447 bytes --]

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;
 

^ permalink raw reply related	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2019-02-14 15:27 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 19:16 net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs John David Anglin
2019-01-22 20:28 ` Andrew Lunn
2019-01-22 21:40   ` John David Anglin
2019-01-22 22:36     ` Andrew Lunn
2019-01-22 23:52       ` John David Anglin
2019-01-23  0:11       ` John David Anglin
2019-01-23  0:22         ` Andrew Lunn
2019-01-25 16:30           ` John David Anglin
2019-01-25 16:48             ` Russell King - ARM Linux admin
2019-01-25 18:38               ` John David Anglin
2019-01-30 17:08           ` John David Anglin
2019-01-30 17:28             ` Andrew Lunn
2019-01-30 19:01               ` John David Anglin
2019-01-30 19:09                 ` Andrew Lunn
2019-01-30 22:24               ` John David Anglin
2019-01-30 22:38                 ` Andrew Lunn
2019-01-31  1:27                   ` John David Anglin
2019-01-31 17:27                     ` John David Anglin
2019-02-04 18:37                       ` [PATCH] net: phylink: dsa: mv88e6xxx: Revise irq setup ordering John David Anglin
2019-02-04 19:35                         ` Andrew Lunn
2019-02-04 19:52                           ` John David Anglin
2019-02-04 20:19                             ` Andrew Lunn
2019-02-04 21:38                               ` John David Anglin
2019-02-04 22:47                                 ` Andrew Lunn
2019-02-04 21:59                         ` [PATCH v2] net: " John David Anglin
2019-02-04 23:14                           ` Andrew Lunn
2019-02-05  0:38                             ` John David Anglin
2019-02-05  2:21                               ` Andrew Lunn
2019-02-05 19:20                                 ` John David Anglin
2019-02-05 19:54                                   ` Andrew Lunn
2019-02-05 18:37                           ` David Miller
2019-02-11 18:40                           ` [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit John David Anglin
2019-02-11 23:33                             ` Andrew Lunn
2019-02-12  0:57                               ` John David Anglin
2019-02-12  1:21                                 ` Andrew Lunn
2019-02-12  3:58                                 ` Andrew Lunn
2019-02-12  6:51                                   ` Heiner Kallweit
2019-02-12 12:56                                     ` Andrew Lunn
2019-02-12 18:42                                       ` Heiner Kallweit
2019-02-12 20:09                                       ` John David Anglin
2019-02-12 16:30                                     ` Russell King - ARM Linux admin
2019-02-12 20:11                                       ` Heiner Kallweit
2019-02-12 20:54                                       ` Heiner Kallweit
2019-02-12 22:55                                         ` Russell King - ARM Linux admin
2019-02-14  2:07                             ` Andrew Lunn
2019-02-14  4:47                               ` David Miller
2019-02-14  4:50                                 ` Andrew Lunn
2019-02-14 15:27                                   ` David Miller
2019-01-22 23:12 ` net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Andrew Lunn
2019-01-22 23:48   ` John David Anglin
2019-01-23  0:00   ` John David Anglin
2019-01-23  0:04     ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.