netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Priit Laes <plaes@plaes.org>
Cc: linux-sunxi@googlegroups.com, wens@csie.org,
	netdev@vger.kernel.org, peppe.cavallaro@st.com,
	alexandre.torgue@st.com, joabreu@synopsys.com
Subject: Re: sun7i-dwmac: link detection failure with 1000Mbit parters
Date: Thu, 31 Oct 2019 14:14:04 +0100	[thread overview]
Message-ID: <20191031131404.GK10555@lunn.ch> (raw)
In-Reply-To: <20191031130422.GJ10555@lunn.ch>

On Thu, Oct 31, 2019 at 02:04:22PM +0100, Andrew Lunn wrote:
> On Wed, Oct 30, 2019 at 08:21:17PM +0000, Priit Laes wrote:
> > 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).
> 
> Hi Pritt
> 
> What PHY is used? And what happens if you use the specific PHY driver,
> not the generic PHY driver?

Schematics of the board are here:

https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/1.%20Latest%20hardware%20revision/A20-OLinuXino-Lime2_Rev_K2_COLOR.pdf

So it has a KSZ9031. The micrel driver supports that device. And there
is a patch which might be relevant:

ommit 3aed3e2a143c9619f4c8d0a3b8fe74d7d3d79c93
Author: Antoine Tenart <antoine.tenart@bootlin.com>
Date:   Tue Apr 16 12:10:20 2019 +0200

    net: phy: micrel: add Asym Pause workaround
    
    The Micrel KSZ9031 PHY may fail to establish a link when the Asymmetric
    Pause capability is set. This issue is described in a Silicon Errata
    (DS80000691D or DS80000692D), which advises to always disable the
    capability. This patch implements the workaround by defining a KSZ9031
    specific get_feature callback to force the Asymmetric Pause capability
    bit to be cleared.
    
    This fixes issues where the link would not come up at boot time, or when
    the Asym Pause bit was set later on.
    
    Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>


Please test using the Micrel PHY driver and see if that solves your
problem.

	Andrew

  reply	other threads:[~2019-10-31 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 20:21 sun7i-dwmac: link detection failure with 1000Mbit parters Priit Laes
2019-10-31  8:39 ` Jose Abreu
2019-10-31 10:38   ` Russell King - ARM Linux admin
2019-11-01  9:49     ` Priit Laes
2019-11-01 10:57       ` Russell King - ARM Linux admin
2019-10-31 13:04 ` Andrew Lunn
2019-10-31 13:14   ` Andrew Lunn [this message]
2019-10-31 16:19     ` Priit Laes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031131404.GK10555@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@st.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-sunxi@googlegroups.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=plaes@plaes.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).