diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2023-04-02 17:13:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-03 11:08:42 +0200 |
commit | a620511080960a72a40c58c55945e41cc3052f6f (patch) | |
tree | e63f7ad47424619b928617d6793d994d937f6161 /drivers/net/phy/smsc.c | |
parent | net: phy: smsc: clear edpd_enable if interrupt mode is used (diff) | |
download | linux-a620511080960a72a40c58c55945e41cc3052f6f.tar.xz linux-a620511080960a72a40c58c55945e41cc3052f6f.zip |
net: phy: smsc: add flag edpd_mode_set_by_user
Add flag edpd_mode_set_by_user in preparation of adding edpd phy tunable
support. This flag will allow users to override the default behavior
of edpd being disabled if interrupt mode is used.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/smsc.c')
-rw-r--r-- | drivers/net/phy/smsc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index f5ecd8bea0e3..25b9cd474e83 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -45,6 +45,7 @@ static struct smsc_hw_stat smsc_hw_stats[] = { struct smsc_phy_priv { unsigned int edpd_enable:1; + unsigned int edpd_mode_set_by_user:1; }; static int smsc_phy_ack_interrupt(struct phy_device *phydev) @@ -117,7 +118,8 @@ int smsc_phy_config_init(struct phy_device *phydev) if (!priv) return 0; - if (phydev->irq != PHY_POLL) + /* don't use EDPD in irq mode except overridden by user */ + if (!priv->edpd_mode_set_by_user && phydev->irq != PHY_POLL) priv->edpd_enable = false; return smsc_phy_config_edpd(phydev); |