aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2015-11-16 23:36:46 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-17 15:25:44 -0500
commit321beec5047af83db90c88114b7e664b156f49fe (patch)
treeb8d964dbcca37c2b52daa42881fab50b4c0b3d48 /drivers
parentphy: marvell: Add support for 88E1540 PHY (diff)
downloadlinux-dev-321beec5047af83db90c88114b7e664b156f49fe.tar.xz
linux-dev-321beec5047af83db90c88114b7e664b156f49fe.zip
net: phy: Use interrupts when available in NOLINK state
The NOLINK state will poll the phy once a second to see if the link has come up. If the phy has an interrupt line, this polling can be skipped, since the phy should interrupt when the link returns. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index adb48abafc87..48ce6ef400fe 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -863,6 +863,9 @@ void phy_state_machine(struct work_struct *work)
needs_aneg = true;
break;
case PHY_NOLINK:
+ if (phy_interrupt_is_valid(phydev))
+ break;
+
err = phy_read_status(phydev);
if (err)
break;