netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: don't reschedule state machine when PHY is halted
@ 2018-09-18 19:12 Heiner Kallweit
  2018-09-18 20:02 ` Florian Fainelli
  2018-09-20 20:34 ` [PATCH net-next v2] " Heiner Kallweit
  0 siblings, 2 replies; 6+ messages in thread
From: Heiner Kallweit @ 2018-09-18 19:12 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org

I think I've seen a similar or same patch before, not sure why it
didn't make it yet. When being in state PHY_HALTED we don't have to
reschedule the state machine, phy_start() will start it again.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1ee25877c..c78203b25 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1123,7 +1123,7 @@ void phy_state_machine(struct work_struct *work)
 	 * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving
 	 * between states from phy_mac_interrupt()
 	 */
-	if (phy_polling_mode(phydev))
+	if (phy_polling_mode(phydev) && old_state != PHY_HALTED)
 		queue_delayed_work(system_power_efficient_wq, &phydev->state_queue,
 				   PHY_STATE_TIME * HZ);
 }
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-23  1:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 19:12 [PATCH] net: phy: don't reschedule state machine when PHY is halted Heiner Kallweit
2018-09-18 20:02 ` Florian Fainelli
2018-09-18 20:17   ` Heiner Kallweit
2018-09-20  0:04     ` Florian Fainelli
2018-09-20 20:34 ` [PATCH net-next v2] " Heiner Kallweit
2018-09-22 19:21   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).