--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
-@@ -218,6 +218,8 @@ static int lan87xx_read_status(struct ph
+@@ -210,6 +210,8 @@ static int lan87xx_read_status(struct ph
int err = genphy_read_status(phydev);
- if (!phydev->link && priv->energy_enable) {
+ if (!phydev->link && priv->energy_enable && phydev->irq == PHY_POLL) {
+ int energy_detected;
+
/* Disable EDPD to wake up PHY */
int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
-@@ -233,7 +235,7 @@ static int lan87xx_read_status(struct ph
+@@ -225,7 +227,7 @@ static int lan87xx_read_status(struct ph
*/
read_poll_timeout(phy_read, rc,
rc & MII_LAN83C185_ENERGYON || rc < 0,
MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
return rc;
-@@ -243,10 +245,16 @@ static int lan87xx_read_status(struct ph
+@@ -235,10 +237,16 @@ static int lan87xx_read_status(struct ph
if (rc < 0)
return rc;