From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next] net: phy: print error message in phy_error
Date: Sun, 16 Dec 2018 16:52:21 +0100 [thread overview]
Message-ID: <5b0ec181-0b51-6e4a-ca1a-097d44c2b7e9@gmail.com> (raw)
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. So let's inform the user.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 890ae1d73..a898fa411 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -739,6 +739,8 @@ static void phy_error(struct phy_device *phydev)
phydev->state = PHY_HALTED;
mutex_unlock(&phydev->lock);
+ phydev_err(phydev, "stopping PHY state machine due to error\n");
+
phy_trigger_machine(phydev);
}
--
2.20.0
next reply other threads:[~2018-12-16 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 15:52 Heiner Kallweit [this message]
2018-12-16 16:48 ` [PATCH net-next] net: phy: print error message in phy_error Andrew Lunn
2018-12-16 17:02 ` Florian Fainelli
2018-12-16 17:16 ` Heiner Kallweit
2018-12-16 17:55 ` Florian Fainelli
2018-12-16 18:11 ` Heiner Kallweit
2018-12-16 17:19 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b0ec181-0b51-6e4a-ca1a-097d44c2b7e9@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox