Clear edpd_enable if interupt mode is used, this avoids
having to check for PHY_POLL multiple times.
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 *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);
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)