Skip to content

Commit 321beec

Browse files
lunndavem330
authored andcommitted
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>
1 parent 819ec8e commit 321beec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/phy/phy.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,9 @@ void phy_state_machine(struct work_struct *work)
863863
needs_aneg = true;
864864
break;
865865
case PHY_NOLINK:
866+
if (phy_interrupt_is_valid(phydev))
867+
break;
868+
866869
err = phy_read_status(phydev);
867870
if (err)
868871
break;

0 commit comments

Comments
 (0)