Skip to content

Commit

Permalink
[PATCH] net/farsync: add set_current_state() before schedule_timeout()
Browse files Browse the repository at this point in the history
Insert set_current_state() before schedule_timeout() so the
function delays as expected. Without the addition, schedule_timeout()
will return immediately.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
  • Loading branch information
Nishanth Aravamudan authored and Jeff Garzik committed Jun 27, 2005
1 parent a26c074 commit 0da8b14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wan/farsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ fst_issue_cmd(struct fst_port_info *port, unsigned short cmd)
/* Wait for any previous command to complete */
while (mbval > NAK) {
spin_unlock_irqrestore(&card->card_lock, flags);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
spin_lock_irqsave(&card->card_lock, flags);

Expand Down

0 comments on commit 0da8b14

Please sign in to comment.