From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
Fugang Duan <fugang.duan@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: phy: don't stop state machine in case of MDIO error
Date: Sun, 16 Dec 2018 10:40:54 +0100 [thread overview]
Message-ID: <4dfc05d9-9f4f-101f-e026-b57b0c194e1d@gmail.com> (raw)
In-Reply-To: <20181216084251.GD18287@lunn.ch>
On 16.12.2018 09:42, Andrew Lunn wrote:
> On Sat, Dec 15, 2018 at 05:18:33PM +0100, Heiner Kallweit wrote:
>> If we detect a MDIO error, it seems to be a little bit too aggressive
>> to stop the state machine and bring down the PHY completely.
>
> Hi Heiner
>
> My assumption is, if we get one MDIO error, we will gets lots more
> MDIO errors. This should be the sort of bus which either works, or it
> does not. In that situation, i think it does make sense to stop
> everything.
>
> I would like to know more about the FEC. Unfortunately, the commit
> adding the timeout handling code does not explain why it is needed.
> We might need to dig further backwards in time to figure it out.
>
After checking the fec history it seems that at the time this
workaround was added as part of phylib support (8 years ago),
the MDIO access timeout value was too low and therefore sometimes
MDIO access failed. Later timeout was set to a higher value and
driver switched to an event-driven mechanism to signal end of
MDIO access. So it should be safe to remove the workaround.
One issue with phy_error() is that it silently stops the PHY.
We should at least add a phydev_err() to let the user know.
> Andrew
>
Heiner
next prev parent reply other threads:[~2018-12-16 9:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 16:17 [PATCH net-next 0/2] net: phy: don't stop state machine in case of MDIO error Heiner Kallweit
2018-12-15 16:18 ` [PATCH net-next 1/2] " Heiner Kallweit
2018-12-16 8:42 ` Andrew Lunn
2018-12-16 9:40 ` Heiner Kallweit [this message]
2018-12-16 15:30 ` Andrew Lunn
2018-12-17 2:14 ` Andy Duan
2018-12-15 16:19 ` [PATCH net-next 2/2] net: fec: remove workaround to restart state machine on " Heiner Kallweit
2018-12-17 2:05 ` Andy Duan
2018-12-17 6:42 ` Heiner Kallweit
2018-12-16 8:29 ` [PATCH net-next 0/2] net: phy: don't stop state machine in case of " Heiner Kallweit
2018-12-16 18:43 ` David Miller
2018-12-16 14:00 ` [PATCH net-next] net: fec: remove workaround to restart phylib state machine on MDIO timeout Heiner Kallweit
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=4dfc05d9-9f4f-101f-e026-b57b0c194e1d@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=fugang.duan@nxp.com \
--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;
as well as URLs for NNTP newsgroup(s).