public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Timur Tabi <timur@codeaurora•org>
Cc: Zefir Kurtisi <zefir.kurtisi@neratec•com>,
	netdev@vger•kernel.org, f.fainelli@gmail•com,
	David Miller <davem@davemloft•net>,
	Manoj Iyer <manoj.iyer@canonical•com>,
	jhugo@codeaurora•org
Subject: Re: [PATCH 2/2] at803x: double check SGMII side autoneg
Date: Mon, 22 May 2017 23:09:27 +0200	[thread overview]
Message-ID: <20170522210927.GR29447@lunn.ch> (raw)
In-Reply-To: <66de55da-7a5c-68b8-50d5-cab313ec0d6f@codeaurora.org>

On Mon, May 22, 2017 at 03:12:03PM -0500, Timur Tabi wrote:
> On 10/24/2016 05:40 AM, Zefir Kurtisi wrote:
> > This commit adds a wrapper function for at8031
> > that in case of operating in SGMII mode double
> > checks SGMII link state when generic aneg_done()
> > succeeds. It prints a warning on failure but
> > intentionally does not try to recover from this
> > state. As a result, if you ever see a warning
> > '803x_aneg_done: SGMII link is not ok' you will
> > end up having an Ethernet link up but won't get
> > any data through. This should not happen, if it
> > does, please contact the module maintainer.
> 
> I'm getting bitten by this one again.  We're now have several systems that
> are reporting the link failure ("803x_aneg_done: SGMII link is not ok"), and
> the interface comes up but is not functional.  I believe this is expected.
> 
> The problem, however, is not because of the link failure.  Instead, the
> problem is this:
> 
> > +	/* check if the SGMII link is OK. */
> > +	if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) {
> > +		pr_warn("803x_aneg_done: SGMII link is not ok\n");
> > +		aneg_done = 0;
> 
> Returning zero is what breaks the interface.  If I comment-out this last
> line, so that at803x_aneg_done() returns BMSR_ANEGCOMPLETE instead, then
> everything works.

Are you using interrupts? Or polling?

If polling, it should come back again 1 second later and see if
auto-neg has completed. Hopefully the SGMII side comes up eventually.

If you are using interrupts, you need another interrupt when the SGMII
side comes up, otherwise i think the state machine is stuck waiting.

     Andrew

  parent reply	other threads:[~2017-05-22 21:09 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 10:40 [PATCH 0/2] at803x: don't power-down SGMII link Zefir Kurtisi
2016-10-24 10:40 ` [PATCH 1/2] Revert "at803x: fix suspend/resume for SGMII link" Zefir Kurtisi
2016-10-27 20:05   ` David Miller
2016-10-24 10:40 ` [PATCH 2/2] at803x: double check SGMII side autoneg Zefir Kurtisi
2016-10-27 20:05   ` David Miller
2016-10-28 22:24   ` Timur Tabi
2016-11-01 11:13     ` Zefir Kurtisi
2017-01-17 23:32   ` Timur Tabi
2017-01-18 11:00     ` Zefir Kurtisi
2017-01-18 13:13       ` Timur Tabi
2017-01-18 13:53         ` Zefir Kurtisi
2017-01-18 15:02           ` Timur Tabi
2017-01-19  9:43             ` Zefir Kurtisi
2017-01-19 18:01               ` Florian Fainelli
2017-01-20  2:38               ` Timur Tabi
2017-01-20 15:31                 ` Zefir Kurtisi
2017-05-22 20:12   ` Timur Tabi
2017-05-22 21:02     ` Andrew Lunn
2017-05-22 21:10       ` Florian Fainelli
2017-05-22 21:19         ` Timur Tabi
2017-05-22 21:50           ` Florian Fainelli
2017-05-22 21:09     ` Andrew Lunn [this message]
2017-05-22 21:29       ` Timur Tabi
2017-05-22 21:32         ` Andrew Lunn
2017-05-23 15:54           ` Timur Tabi
2017-05-23 16:07             ` Andrew Lunn
2017-05-23 16:33               ` Timur Tabi
2017-05-24  7:18                 ` Matthias May
2017-05-24 13:29                   ` Timur Tabi
2017-05-24 13:40                     ` Andrew Lunn
2017-05-24 13:48                       ` Timur Tabi
2017-05-24 14:09                         ` Andrew Lunn
2017-05-24 18:58                           ` Timur Tabi
2017-05-24 19:34                             ` Andrew Lunn
2017-05-24 20:57                               ` Timur Tabi
2017-05-24 21:15                                 ` Andrew Lunn
2017-05-24 21:20                                   ` Timur Tabi
2017-05-24 21:28                                     ` Florian Fainelli
2017-05-24 21:32                                       ` Timur Tabi
2017-05-24 21:36                                         ` Florian Fainelli
2017-05-24 22:03                                           ` Timur Tabi
2017-05-24 21:19                                 ` Florian Fainelli
2017-06-01 11:45                     ` Zefir Kurtisi
2017-06-01 14:48                       ` Timur Tabi
2016-10-25 17:31 ` [PATCH 0/2] at803x: don't power-down SGMII link Timur Tabi
2016-10-27  8:05   ` Zefir Kurtisi

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=20170522210927.GR29447@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=jhugo@codeaurora$(echo .)org \
    --cc=manoj.iyer@canonical$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=timur@codeaurora$(echo .)org \
    --cc=zefir.kurtisi@neratec$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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