Thread (12 messages) flat view 12 messages, 4 authors, 2018-12-17

Re: [PATCH net-next 1/2] net: phy: don't stop state machine in case of MDIO error

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: 2018-12-16 09:41:02

On 16.12.2018 09:42, Andrew Lunn wrote:
On Sat, Dec 15, 2018 at 05:18:33PM +0100, Heiner Kallweit wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help