netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
@ 2004-09-21 20:29 chas williams (contractor)
  2004-09-21 22:18 ` David S. Miller
  2004-09-23 16:07 ` Nishanth Aravamudan
  0 siblings, 2 replies; 5+ messages in thread
From: chas williams (contractor) @ 2004-09-21 20:29 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nishanth Aravamudan, kernel-janitors

dave,

this patch (from nacc@us.ibm.com) replaces assorted schedule_timeout()'s
with msleep()'s.  please apply to 2.6.

thanks!

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/09/17 20:30:30-04:00 chas@relax.cmf.nrl.navy.mil 
#   [ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
# 
diff -Nru a/drivers/atm/firestream.c b/drivers/atm/firestream.c
--- a/drivers/atm/firestream.c	2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/firestream.c	2004-09-21 12:48:17 -04:00
@@ -1704,8 +1704,7 @@
 		}
 
 		/* Try again after 10ms. */
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout ((HZ+99)/100);
+		msleep(10);
 	}
 
 	if (!to) {
diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c
--- a/drivers/atm/he.c	2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/he.c	2004-09-21 12:48:17 -04:00
@@ -2596,9 +2596,8 @@
 
 		while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) &&
 		       (retry < MAX_RETRY)) {
-			set_current_state(TASK_UNINTERRUPTIBLE);
-			(void) schedule_timeout(sleep);
-			if (sleep < HZ)
+			msleep(sleep);
+			if (sleep < 250)
 				sleep = sleep * 2;
 
 			++retry;
diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
--- a/drivers/atm/idt77252.c	2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/idt77252.c	2004-09-21 12:48:17 -04:00
@@ -2516,7 +2516,7 @@
 	struct vc_map *vc = vcc->dev_data;
 	unsigned long flags;
 	unsigned long addr;
-	int timeout;
+	unsigned long timeout;
 
 	down(&card->mutex);
 
@@ -2566,9 +2566,9 @@
 		}
 		spin_unlock_irqrestore(&vc->lock, flags);
 
-		timeout = 5 * HZ;
+		timeout = 5 * 1000;
 		while (atomic_read(&vc->scq->used) > 0) {
-			timeout = schedule_timeout(timeout);
+			timeout = msleep_interruptible(timeout);
 			if (!timeout)
 				break;
 		}
diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
--- a/drivers/atm/lanai.c	2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/lanai.c	2004-09-21 12:48:17 -04:00
@@ -813,7 +813,7 @@
 			DPRINTK("read, write = %d, %d\n", read, write);
 			break;
 		}
-		schedule_timeout(HZ / 25);
+		msleep(4);
 	}
 	/* 15.2.2 - clear out all tx registers */
 	cardvcc_write(lvcc, 0, vcc_txreadptr);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-23 20:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-21 20:29 [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>) chas williams (contractor)
2004-09-21 22:18 ` David S. Miller
2004-09-23 16:07 ` Nishanth Aravamudan
2004-09-23 16:26   ` chas williams (contractor)
2004-09-23 20:30     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).