[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8c2ca24-65a8-fbc4-f74d-aa90a9505787@gmail.com>
Date: Sun, 2 Apr 2023 11:45:54 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next 3/7] net: phy: smsc: clear edpd_enable if interrupt
mode is used
Clear edpd_enable if interrupt mode is used, this avoids
having to check for PHY_POLL multiple times.
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
drivers/net/phy/smsc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 1b588366e..f5ecd8bea 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -114,9 +114,12 @@ int smsc_phy_config_init(struct phy_device *phydev)
{
struct smsc_phy_priv *priv = phydev->priv;
- if (!priv || !priv->edpd_enable || phydev->irq != PHY_POLL)
+ if (!priv)
return 0;
+ if (phydev->irq != PHY_POLL)
+ priv->edpd_enable = false;
+
return smsc_phy_config_edpd(phydev);
}
EXPORT_SYMBOL_GPL(smsc_phy_config_init);
@@ -208,8 +211,7 @@ int lan87xx_read_status(struct phy_device *phydev)
if (err)
return err;
- if (!phydev->link && priv && priv->edpd_enable &&
- phydev->irq == PHY_POLL) {
+ if (!phydev->link && priv && priv->edpd_enable) {
/* Disable EDPD to wake up PHY */
int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
--
2.40.0
Powered by blists - more mailing lists