From: janitor@sternwelten.at
To: netdev@oss.sgi.com
Cc: jgarzik@pobox.com, jt@hpl.hp.com, janitor@sternwelten.at
Subject: [patch 6/8] wireless/airo: replace schedule_timeout() with msleep()
Date: Wed, 01 Sep 2004 23:05:50 +0200 [thread overview]
Message-ID: <E1C2cIh-00082W-6F@sputnik> (raw)
I would appreciate any comments from the janitor@sternweltens list.
Description: Use msleep() instead of schedule_timeout() to guarantee
the task delays for the desired time.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.9-rc1-bk7-max/drivers/net/wireless/airo.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff -puN drivers/net/wireless/airo.c~msleep-drivers_net_wireless_airo drivers/net/wireless/airo.c
--- linux-2.6.9-rc1-bk7/drivers/net/wireless/airo.c~msleep-drivers_net_wireless_airo 2004-09-01 19:35:39.000000000 +0200
+++ linux-2.6.9-rc1-bk7-max/drivers/net/wireless/airo.c 2004-09-01 19:35:39.000000000 +0200
@@ -2670,11 +2670,9 @@ int reset_card( struct net_device *dev ,
return -1;
waitbusy (ai);
OUT4500(ai,COMMAND,CMD_SOFTRESET);
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ/5);
+ msleep(200);
waitbusy (ai);
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ/5);
+ msleep(200);
if (lock)
up(&ai->sem);
return 0;
@@ -7436,8 +7434,7 @@ int cmdreset(struct airo_info *ai) {
OUT4500(ai,COMMAND,CMD_SOFTRESET);
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ); /* WAS 600 12/7/00 */
+ msleep(1000); /* WAS 600 12/7/00 */
if(!waitbusy (ai)){
printk(KERN_INFO "Waitbusy hang AFTER RESET\n");
@@ -7464,8 +7461,7 @@ int setflashmode (struct airo_info *ai)
OUT4500(ai, SWS3, FLASH_COMMAND);
OUT4500(ai, COMMAND,0);
}
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ/2); /* 500ms delay */
+ msleep(500);
if(!waitbusy(ai)) {
clear_bit (FLAG_FLASHING, &ai->flags);
@@ -7575,8 +7571,7 @@ int flashputbuf(struct airo_info *ai){
int flashrestart(struct airo_info *ai,struct net_device *dev){
int i,status;
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ); /* Added 12/7/00 */
+ msleep(1000); /* Added 12/7/00 */
clear_bit (FLAG_FLASHING, &ai->flags);
if (test_bit(FLAG_MPI, &ai->flags)) {
status = mpi_init_descriptors(ai);
@@ -7591,8 +7586,7 @@ int flashrestart(struct airo_info *ai,st
( ai, 2312, i >= MAX_FIDS / 2 );
}
- set_current_state (TASK_UNINTERRUPTIBLE);
- schedule_timeout (HZ); /* Added 12/7/00 */
+ msleep(1000); /* Added 12/7/00 */
return status;
}
#endif /* CISCO_EXT */
_
reply other threads:[~2004-09-01 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1C2cIh-00082W-6F@sputnik \
--to=janitor@sternwelten.at \
--cc=jgarzik@pobox.com \
--cc=jt@hpl.hp.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).