From: Trent Piepho Date: Wed, 8 Oct 2008 22:46:57 +0000 (-0700) Subject: phylib: Wake PHY state machine on interrupt X-Git-Tag: v2.6.28-rc1~717^2~79 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0acb28396728f42b6b1553c85d27c37513796043;p=linux-2.6-omap-h63xx.git 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 Acked-by: Andy Fleming Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 0433fcd0094..20cc82c7813 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: