[PATCH] net/farsync: add set_current_state() before schedule_timeout()
authorNishanth Aravamudan <nacc@us.ibm.com>
Mon, 20 Jun 2005 21:54:25 +0000 (23:54 +0200)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 27 Jun 2005 03:48:37 +0000 (23:48 -0400)
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>
drivers/net/wan/farsync.c

index 7575b799ce5368751c76323e61107d8766df2400..7217d44e885404ca310571dc246121ba0ab9d4b5 100644 (file)
@@ -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);