Subject: Re: sun7i-dwmac: link detection failure with 1000Mbit parters

From: Russell King - ARM Linux admin <[email-masked]>
Date: Thu, 31 Oct 2019 10:38:41 +0000

On Thu, Oct 31, 2019 at 08:39:06AM +0000, Jose Abreu wrote:
> ++ Florian, Andrew, Heiner, Russell
> 
> Can you please attach your dmesg log ? PHYLINK provides some useful 
> debug logs.
> 
> From: Priit Laes <[email-masked]>
> Date: Oct/30/2019, 20:21:17 (UTC+00:00)
> 
> > Heya!
> > 
> > I have noticed that with sun7i-dwmac driver (OLinuxino Lime2 eMMC), link
> > detection fails consistently with certain 1000Mbit partners (for example Huawei
> > B525s-23a 4g modem ethernet outputs and RTL8153-based USB3.0 ethernet dongle),
> > but the same hardware works properly with certain other link partners (100Mbit GL AR150
> > for example).
> > 
> > (Just need to test with another 1000Mbit switch at the office).
> > 
> > I first thought it could be a regression, but I went from current master to as far back
> > as 5.2.0-rc6 where it was still broken.

The stmmac conversion to phylink was v5.3-rc1, so that's likely not the
issue if v5.2-rc6 also exhibits this behaviour.

My guess is that the problem lies in phylib, especially as the link LEDs
go off when the link is configured.  I notice that it's using the
generic PHY driver rather than a specific driver.

  mii-diag -v eth0

would be useful to see for the case where the link has failed, without
replugging the ethernet cable.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up