Commit d56417ad authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: smsc: clear edpd_enable if interrupt mode is used

Clear edpd_enable if interupt mode is used, this avoids
having to check for PHY_POLL multiple times.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89946e31
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment