Skip to content

Commit

Permalink
phylib: Wake PHY state machine on interrupt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trent Piepho authored and David S. Miller committed Oct 8, 2008
1 parent 51e2a38 commit 0acb283
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0acb283

Please sign in to comment.