aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-12-16 19:18:26 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-18 15:11:46 -0800
commitfa7b28c11bbf389617327ad4dd69bbbbbc16a8b4 (patch)
treec31e504a55dff071ad841a880fe592ace01bd034 /drivers/net/phy/phy.c
parentnet: phy: improve phy state checking (diff)
downloadlinux-dev-fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4.tar.xz
linux-dev-fa7b28c11bbf389617327ad4dd69bbbbbc16a8b4.zip
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>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c2
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);