* [patch 07/18] net/islpci_dev: replace schedule_timeout() with msleep()
@ 2004-10-30 22:42 janitor
0 siblings, 0 replies; only message in thread
From: janitor @ 2004-10-30 22:42 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, janitor, nacc
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>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.10-rc1-max/drivers/net/wireless/prism54/islpci_dev.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
diff -puN drivers/net/wireless/prism54/islpci_dev.c~msleep-drivers_net_wireless_prism54_islpci_dev drivers/net/wireless/prism54/islpci_dev.c
--- linux-2.6.10-rc1/drivers/net/wireless/prism54/islpci_dev.c~msleep-drivers_net_wireless_prism54_islpci_dev 2004-10-24 17:05:03.000000000 +0200
+++ linux-2.6.10-rc1-max/drivers/net/wireless/prism54/islpci_dev.c 2004-10-24 17:05:03.000000000 +0200
@@ -438,8 +438,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;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-30 22:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-30 22:42 [patch 07/18] net/islpci_dev: replace schedule_timeout() with msleep() janitor
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).