From: Heiner Kallweit Date: Sun, 16 Dec 2018 18:18:26 +0000 (+0100) Subject: net: phy: print stack trace in phy_error X-Git-Tag: v5.0-rc1~129^2~55 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4;p=linux.git net: phy: print stack trace in phy_error So far phy_error() silently stops the PHY state machine. If the network driver doesn't inform about a MDIO error then the user may wonder why his network is down. Let's print the stack trace to facilitate search for the root cause of the error. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 21df28b9882c..d33e7b3caf03 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -730,6 +730,8 @@ void phy_stop_machine(struct phy_device *phydev) */ static void phy_error(struct phy_device *phydev) { + WARN_ON(1); + mutex_lock(&phydev->lock); phydev->state = PHY_HALTED; mutex_unlock(&phydev->lock);