From: Justin Chen <justin.chen@broadcom.com>
To: netdev@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com,
florian.fainelli@broadcom.com,
Justin Chen <justin.chen@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] net: phy: Only resume phy if it is suspended
Date: Tue, 5 Dec 2023 15:42:29 -0800 [thread overview]
Message-ID: <20231205234229.274601-1-justin.chen@broadcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
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@broadcom.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
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4206 bytes --]
next reply other threads:[~2023-12-05 23:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 23:42 Justin Chen [this message]
2023-12-06 0:03 ` Andrew Lunn
2023-12-06 0:10 ` Justin Chen
2023-12-06 0:12 ` Florian Fainelli
2023-12-07 17:56 ` Florian Fainelli
2023-12-07 18:50 ` Russell King (Oracle)
2023-12-08 17:36 ` Florian Fainelli
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=20231205234229.274601-1-justin.chen@broadcom.com \
--to=justin.chen@broadcom.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®