* [PATCH net-next] net: phy: Use interrupts when available in NOLINK state
@ 2015-11-16 22:36 Andrew Lunn
2015-11-17 20:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2015-11-16 22:36 UTC (permalink / raw)
To: David Miller; +Cc: Florian Fainelli, netdev, Andrew Lunn
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>
---
drivers/net/phy/phy.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: phy: Use interrupts when available in NOLINK state
2015-11-16 22:36 [PATCH net-next] net: phy: Use interrupts when available in NOLINK state Andrew Lunn
@ 2015-11-17 20:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-11-17 20:26 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, netdev
From: Andrew Lunn <andrew@lunn.ch>
Date: Mon, 16 Nov 2015 23:36:46 +0100
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-17 20:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 22:36 [PATCH net-next] net: phy: Use interrupts when available in NOLINK state Andrew Lunn
2015-11-17 20:26 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.