netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Paul Thomas <pthomas8589@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: net: phy: micrel KSZ9031 ifdown ifup issue
Date: Mon, 16 Sep 2019 17:13:16 +0200	[thread overview]
Message-ID: <20190916151316.GA8144@lunn.ch> (raw)
In-Reply-To: <CAD56B7dF9Dqf1wwu=w60z0q+hkE5-noZRS4uuUfF4PhyNSa4Kw@mail.gmail.com>

> When it is in the good state I see that reg 0x01 is 0x796d where bit
> 1.2 reports 'Link is up' and bit 1.5 reports 'Auto-negotiation process
> complete'. However, once I get to the bad state (it may take several
> tries of ifdown, ifup to get there) then reg 0x01 is 0x7649 reporting
> 'Link is down' and 'Auto-negotiation process not completed'. This can
> be fixed by resetting the phy './phytool write eth0/3/0 0x9140'
> 
> So, I guess that means the driver is doing what it is supposed to?
> Could we add quirk or something to reset the phy again from the driver
> if auto-negotiation doesn't complete with x seconds?

Hi Paul

Adding a timeout would make sense. But please try to hide all this
inside the PHY driver. Since it is being polled, the read_status()
should be called once per second, so you should be able to handle all
this inside that driver callback.

     Andrew

  reply	other threads:[~2019-09-16 15:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 14:42 net: phy: micrel KSZ9031 ifdown ifup issue Paul Thomas
2019-09-14 14:54 ` Andrew Lunn
2019-09-16 13:54   ` Paul Thomas
2019-09-16 15:13     ` Andrew Lunn [this message]
2019-09-16 19:07       ` Paul Thomas

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=20190916151316.GA8144@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pthomas8589@gmail.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).