diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-12-16 19:18:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-18 15:11:46 -0800 |
commit | fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4 (patch) | |
tree | c31e504a55dff071ad841a880fe592ace01bd034 | |
parent | 2b3e88ea65287ba738a798622405b15344871085 (diff) |
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 <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/phy.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |