From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: [PATCH] net: phy: don't reschedule state machine when PHY is halted Date: Tue, 18 Sep 2018 21:12:14 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Andrew Lunn , Florian Fainelli , David Miller Return-path: Received: from mail-wm1-f67.google.com ([209.85.128.67]:54815 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728726AbeISAqW (ORCPT ); Tue, 18 Sep 2018 20:46:22 -0400 Received: by mail-wm1-f67.google.com with SMTP id c14-v6so3682444wmb.4 for ; Tue, 18 Sep 2018 12:12:22 -0700 (PDT) Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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 --- 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