From: Andrew Lunn <andrew@lunn.ch>
To: Timur Tabi <timur@codeaurora.org>
Cc: Matthias May <matthias.may@neratec.com>,
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: Wed, 24 May 2017 21:34:50 +0200 [thread overview]
Message-ID: <20170524193450.GC1788@lunn.ch> (raw)
In-Reply-To: <c2a54e2e-a1b6-24b4-d125-95fa9648fe95@codeaurora.org>
On Wed, May 24, 2017 at 01:58:09PM -0500, Timur Tabi wrote:
> On 05/24/2017 09:09 AM, Andrew Lunn wrote:
> > It could be, the copper side is up, but the SGMII side is down, at the
> > point at803x_aneg_done() is called. So it is correctly returning
> > 0. Sometime later the SGMII side goes up, but there is not a second
> > interrupt. Hence the phy core does not know that the full, 2 stage MAC
> > to PHY to peer PHY link is now up.
>
> Ok, I'm going to debug this some more. It turns out that the MAC side of
> the SGMII link can send an interrupt when it thinks that auto-negotiation is
> done. I might be able to use this.
You can use this for your board. But it still leaves the phy driver
broken for everybody else.
> What function should my MAC driver call when it wants the phy core to call
> at803x_aneg_done again to see if autonegotiation is done?
You want to trigger the PHY state machine. There is only one exported
API call to do this, phy_mac_interrupt(). But you are supposed to pass
the new link state. And your MAC driver has no idea of that, it does
not know if the copper side of the PHY is up.
So it might be better if you export phy_trigger_machine().
> Also, is there a way for the MAC driver to know that at803x_aneg_done()
> previously returned 0, and that it needs to tell the phy core to check again?
Not that i know of. The MAC layer is not supposed to be messing around
in the PHY layer. However, just triggering the PHY state machine
should be enough.
Andrew
next prev parent reply other threads:[~2017-05-24 19:34 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
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 [this message]
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=20170524193450.GC1788@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jhugo@codeaurora.org \
--cc=manoj.iyer@canonical.com \
--cc=matthias.may@neratec.com \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=zefir.kurtisi@neratec.com \
/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).