[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231205234229.274601-1-justin.chen@broadcom.com>
Date: Tue, 5 Dec 2023 15:42:29 -0800
From: Justin Chen <justin.chen@...adcom.com>
To: netdev@...r.kernel.org
Cc: bcm-kernel-feedback-list@...adcom.com,
florian.fainelli@...adcom.com,
Justin Chen <justin.chen@...adcom.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] net: phy: Only resume phy if it is suspended
Resuming the phy can take quite a bit of time. Lets only resume the
phy if it is suspended.
Signed-off-by: Justin Chen <justin.chen@...adcom.com>
---
drivers/net/phy/phy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 3376e58e2b88..7fbb21922d64 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1549,7 +1549,8 @@ void phy_start(struct phy_device *phydev)
sfp_upstream_start(phydev->sfp_bus);
/* if phy was suspended, bring the physical link up again */
- __phy_resume(phydev);
+ if (phydev->suspended)
+ __phy_resume(phydev);
phydev->state = PHY_UP;
--
2.34.1
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4206 bytes)
Powered by blists - more mailing lists