All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace
@ 2004-09-23 22:13 Nishanth Aravamudan
  2004-09-23 22:55   ` [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Luis R. Rodriguez
  0 siblings, 1 reply; 48+ messages in thread
From: Nishanth Aravamudan @ 2004-09-23 22:13 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

Any comments would be appreciated.

Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected. Also set_current_state() is
inserted before schedule_timeout(). If the for-loop were to execute
twice, the second time would not set the state before sleeping in the
current code; this causes schedule_timeout() to return immediately.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.9-rc2-vanilla/drivers/net/wireless/prism54/islpci_dev.c	2004-09-13 17:15:41.000000000 -0700
+++ 2.6.9-rc2/drivers/net/wireless/prism54/islpci_dev.c	2004-09-23 13:58:42.000000000 -0700
@@ -436,8 +436,7 @@ prism54_bring_down(islpci_private *priv)
 	wmb();
 
 	/* wait a while for the device to reset */
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(50*HZ/1000);
+	msleep(50);
 
 	return 0;
 }
@@ -489,6 +488,7 @@ islpci_reset_if(islpci_private *priv)
 		/* The software reset acknowledge needs about 220 msec here.
 		 * Be conservative and wait for up to one second. */
 	
+		set_current_state(TASK_UNINTERRUPTIBLE);
 		remaining = schedule_timeout(HZ);
 
 		if(remaining > 0) {

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2004-10-31 14:53 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23 22:13 [Kernel-janitors] [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace Nishanth Aravamudan
2004-09-23 22:55 ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Luis R. Rodriguez
2004-09-23 22:55   ` [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Luis R. Rodriguez
2004-09-24  7:43   ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Margit Schubert-While
2004-09-24  7:43     ` [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Margit Schubert-While
2004-09-24 16:34     ` [Kernel-janitors] [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace maximilian attems
2004-09-24 16:34       ` [Kernel-janitors] [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() maximilian attems
2004-10-01  4:15     ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Jeff Garzik
2004-10-01  4:15       ` [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Jeff Garzik
2004-10-01  7:04       ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Margit Schubert-While
2004-10-01  7:04         ` [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Margit Schubert-While
2004-10-01 16:55         ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Greg KH
2004-10-01 16:55           ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Greg KH
2004-10-02  9:07           ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] Margit Schubert-While
2004-10-02  9:07             ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Margit Schubert-While
2004-10-04 21:04             ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: Jeff Garzik
2004-10-04 21:04               ` [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Jeff Garzik
2004-10-30 22:22       ` [KJ] [patch 2.4] back port msleep(), msleep_interruptible() maximilian attems
2004-10-30 22:22         ` maximilian attems
2004-10-30 22:22         ` maximilian attems
2004-10-30 22:41         ` [KJ] " Jeff Garzik
2004-10-30 22:41           ` Jeff Garzik
2004-10-30 22:41           ` Jeff Garzik
2004-10-30 22:59           ` [KJ] " Nish Aravamudan
2004-10-30 22:59           ` Nish Aravamudan
2004-10-30 22:59           ` Nish Aravamudan
2004-10-30 22:59             ` Nish Aravamudan
2004-10-30 23:19             ` maximilian attems
2004-10-30 23:19               ` maximilian attems
2004-10-30 23:19             ` maximilian attems
2004-10-30 23:19             ` maximilian attems
2004-10-31 14:43           ` maximilian attems
2004-10-31 14:43           ` maximilian attems
2004-10-31 14:43           ` [KJ] " maximilian attems
2004-10-31 14:43             ` maximilian attems
2004-10-31 14:44           ` [KJ] [patch 1/6] " maximilian attems
2004-10-31 14:44             ` maximilian attems
2004-10-31 14:44             ` maximilian attems
2004-10-31 14:44           ` [KJ] [patch 2/6] libata remove duplicate definition maximilian attems
2004-10-31 14:44             ` [patch 2/6] libata remove duplicate definition msecs_to_jiffies() maximilian attems
2004-10-31 14:44           ` [KJ] [patch 3/6] sx8 remove duplicate definition msleep(), maximilian attems
2004-10-31 14:44             ` [patch 3/6] sx8 remove duplicate definition msleep(), msecs_to_jiffies() maximilian attems
2004-10-31 14:45           ` [KJ] [patch 4/6] char/shwdt remove duplicate msecs_to_jiffies() maximilian attems
2004-10-31 14:45             ` maximilian attems
2004-10-31 14:45           ` [KJ] [patch 5/6] sata_promise remove duplicate msleep() definition maximilian attems
2004-10-31 14:45             ` maximilian attems
2004-10-31 14:45           ` [KJ] [patch 6/6] libata remove msleep_libata() maximilian attems
2004-10-31 14:45             ` maximilian attems

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.