Skip to contentSkip to conversation

net: phy: print stack trace in phy_error

PATCH Applied Heiner Kallweit 2 participants 2 messages Dec 16, 2018 – Dec 18, 2018

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH v2 1/1 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.

---
 drivers/net/phy/phy.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/phy/phy.c +2 -0
index 21df28b98..d33e7b3ca 100644
@@ -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);
Signature · 1 line
2.20.0
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Sun, 16 Dec 2018 19:18:26 +0100

Quoted 6 lines

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.

Applied.