Commit 321beec5 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 819ec8e1
...@@ -863,6 +863,9 @@ void phy_state_machine(struct work_struct *work) ...@@ -863,6 +863,9 @@ void phy_state_machine(struct work_struct *work)
needs_aneg = true; needs_aneg = true;
break; break;
case PHY_NOLINK: case PHY_NOLINK:
if (phy_interrupt_is_valid(phydev))
break;
err = phy_read_status(phydev); err = phy_read_status(phydev);
if (err) if (err)
break; break;
......
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