summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@freescale.com>2008-10-09 00:46:57 +0200
committerDavid S. Miller <davem@davemloft.net>2008-10-09 00:46:57 +0200
commit0acb28396728f42b6b1553c85d27c37513796043 (patch)
tree2b56f5734d139c748c030e90ccf047a3b261fb1e /drivers/net/phy/phy.c
parentPHY: Avoid unnecessary aneg restarts (diff)
downloadlinux-0acb28396728f42b6b1553c85d27c37513796043.tar.xz
linux-0acb28396728f42b6b1553c85d27c37513796043.zip
phylib: Wake PHY state machine on interrupt
This way the phy layer will respond to a change in phy state immediately, instead of up to one second later when the state machine timer runs. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 0433fcd00943..20cc82c78137 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -729,6 +729,12 @@ static void phy_change(struct work_struct *work)
if (err)
goto irq_enable_err;
+ /* Stop timer and run the state queue now. The work function for
+ * state_queue will start the timer up again.
+ */
+ del_timer(&phydev->phy_timer);
+ schedule_work(&phydev->state_queue);
+
return;
irq_enable_err: