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>
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)
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);