]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: phy: print stack trace in phy_error
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 16 Dec 2018 18:18:26 +0000 (19:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Dec 2018 23:11:46 +0000 (15:11 -0800)
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 <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c

index 21df28b9882c73ebd7cc765598641031f2d571bb..d33e7b3caf03cb9af913f56dc47d732fe9b96a69 100644 (file)
@@ -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);