mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Alexander Kochetkov <al.kochet@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt
Date: Wed, 19 Apr 2017 21:11:43 +0300	[thread overview]
Message-ID: <129784d6-9020-6d01-4b3d-4740ac61368b@cogentembedded.com> (raw)
In-Reply-To: <1492609604-16359-1-git-send-email-al.kochet@gmail.com>

Hello!

On 04/19/2017 04:46 PM, Alexander Kochetkov wrote:

> The problem I fix related to SMSC LAN8710/LAN8720 PHY handled using
> interrupts. During power-up cycle the PHY do auto-negotiation, generate
> interrupt and set BMSR_ANEGCOMPLETE flag. Interrupt is handled by PHY
> state machine but doesn't update link because PHY is in PHY_READY state.
> After some time MAC bring up and connect with PHY. It start PHY using
> phy_start(). During startup PHY change state to PHY_AN but doesn't
> set BMCR_ANRESTART flag due to genphy_config_aneg() doesn't update MII_BMCR
> because there no new to advertising. As a result, state machine wait for
           ^^^^^^^^^^^^    ^^^^^^^^^^^
    There is no new what? Advertize, maybe?

> interrupt from PHY and nether get "link is up". Because BMSR_ANEGCOMPLETE
                          ^^^^^^
    Never, neither? :-)

> already set the patch schedule check link without waiting interrupt.
> In case genphy_config_aneg() update MII_BMCR and set BMCR_ANRESTART
> flag, BMSR_ANEGCOMPLETE will be cleared and state machine will continue
> on auto-negotiation interrupt.
>
> Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
[...]

MBR, Sergei

      parent reply	other threads:[~2017-04-19 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 13:46 Alexander Kochetkov
2017-04-19 14:05 ` Alexander Kochetkov
2017-04-19 16:32   ` Florian Fainelli
2017-04-19 16:53     ` Alexander Kochetkov
2017-04-20  9:21       ` Roger Quadros
2017-04-19 18:11 ` Sergei Shtylyov [this message]

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=129784d6-9020-6d01-4b3d-4740ac61368b@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=al.kochet@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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

all inboxes | Powered by JetHome®