Subject: [patch 1/1] net/farsync: add set_current_state() before schedule_timeout()

From: [email-masked]
Date: Wed, 12 Jan 2005 00:07:43 +0100

Any comments would be appreciated.

Description: 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 <[email-masked]>
Signed-off-by: Maximilian Attems <[email-masked]>
Signed-off-by: Domen Puncer <[email-masked]>
---

 kj-domen/drivers/net/wan/farsync.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/net/wan/farsync.c~set_current_state-drivers_net_wan_farsync drivers/net/wan/farsync.c
--- kj/drivers/net/wan/farsync.c~set_current_state-drivers_net_wan_farsync	2005-01-10 18:00:19.000000000 +0100
+++ kj-domen/drivers/net/wan/farsync.c	2005-01-10 18:00:19.000000000 +0100
@@ -981,6 +981,7 @@ fst_issue_cmd(struct fst_port_info *port
 	/* 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);
 
_