Skip to content

Commit

Permalink
net: phy: Use interrupts when available in NOLINK state
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lunn authored and davem330 committed Nov 17, 2015
1 parent 819ec8e commit 321beec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 321beec

Please sign in to comment.