Subject: Re: [PATCH net] net: phy: make phy_error() report which PHY has failed

From: Russell King - ARM Linux admin <[email-masked]>
Date: Thu, 19 Dec 2019 21:45:37 +0000

On Thu, Dec 19, 2019 at 12:50:10PM -0800, David Miller wrote:
> From: Russell King <[email-masked]>
> Date: Tue, 17 Dec 2019 12:53:05 +0000
> 
> > phy_error() is called from phy_interrupt() or phy_state_machine(), and
> > uses WARN_ON() to print a backtrace. The backtrace is not useful when
> > reporting a PHY error.
> > 
> > However, a system may contain multiple ethernet PHYs, and phy_error()
> > gives no clue which one caused the problem.
> > 
> > Replace WARN_ON() with a call to phydev_err() so that we can see which
> > PHY had an error, and also inform the user that we are halting the PHY.
> > 
> > Fixes: fa7b28c11bbf ("net: phy: print stack trace in phy_error")
> > Signed-off-by: Russell King <[email-masked]>
> 
> I think I agree with Heiner that it is valuable to know whether the
> error occurred from the interrupt handler or the state machine (and
> if the state machine, where that got called from).

Would you accept, then, passing a string to indicate where phy_error()
was called from, which would do the same job without tainting the
kernel for something that becomes a _normal_ event when removing a
SFP?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up