From: Nishanth Aravamudan Date: Mon, 20 Jun 2005 21:54:25 +0000 (+0200) Subject: [PATCH] net/farsync: add set_current_state() before schedule_timeout() X-Git-Tag: v2.6.13-rc1~51^2~40^2~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0da8b1454815862e03dae1a199936832a6e67868;p=linux-2.6-omap-h63xx.git [PATCH] net/farsync: add set_current_state() before schedule_timeout() 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 Signed-off-by: Maximilian Attems Signed-off-by: Domen Puncer --- diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 7575b799ce5..7217d44e885 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -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);