From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] message/mptbase: replace
Date: Mon, 20 Sep 2004 23:15:07 +0000 [thread overview]
Message-ID: <20040920231507.GB2270@us.ibm.com> (raw)
In-Reply-To: <20040916234735.GJ1777@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 4521 bytes --]
Any comments would be appreciated. I was recently informed that
i2o_core.c was removed from the kernel, so one of my patches was
obsoleted. Hence, the total number has dropped to 3.
Description: Use msleep_interruptible() instead of schedule_timeout()
to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.9-rc1-mm4-vanilla/drivers/message/fusion/mptbase.c 2004-09-09 23:05:59.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/message/fusion/mptbase.c 2004-09-10 11:59:42.000000000 -0700
@@ -2229,8 +2229,7 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
}
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible(1);
} else {
mdelay (1); /* 1 msec delay */
}
@@ -2599,8 +2598,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
state = mpt_GetIocState(ioc, 1);
while (state != MPI_IOC_STATE_OPERATIONAL && --cntdn) {
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible(1);
} else {
mdelay(1);
}
@@ -2867,8 +2865,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int s
/* wait 1 msec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible(1);
} else {
mdelay (1);
}
@@ -2885,8 +2882,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int s
}
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ msleep_interruptible (1000);
} else {
mdelay (1000);
}
@@ -2986,8 +2982,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int s
return 0;
}
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(10 * HZ / 1000);
+ msleep_interruptible (10);
} else {
mdelay (10);
}
@@ -3038,8 +3033,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ msleep_interruptible (1000);
} else {
mdelay (1000);
}
@@ -3061,8 +3055,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
return hard_reset_done;
}
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(10 * HZ / 1000);
+ msleep_interruptible (10);
} else {
mdelay (10);
}
@@ -3133,8 +3126,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
/* wait 100 msec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(100 * HZ / 1000);
+ msleep_interruptible (100);
} else {
mdelay (100);
}
@@ -3213,8 +3205,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ msleep_interruptible (1000);
} else {
mdelay (1000);
}
@@ -3241,8 +3232,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1000 * HZ / 1000);
+ msleep_interruptible(1000);
} else {
mdelay (1000);
}
@@ -3276,8 +3266,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
/* wait 100 msec */
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(100 * HZ / 1000);
+ msleep_interruptible (100);
} else {
mdelay (100);
}
@@ -3371,8 +3360,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_
}
if (sleepFlag == CAN_SLEEP) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible(1);
} else {
mdelay (1); /* 1 msec delay */
}
@@ -3808,8 +3796,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int
intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible (1);
count++;
}
} else {
@@ -3858,8 +3845,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int
intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (intstat & MPI_HIS_DOORBELL_INTERRUPT)
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1 * HZ / 1000);
+ msleep_interruptible(1);
count++;
}
} else {
[-- 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
next prev parent reply other threads:[~2004-09-20 23:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 23:47 [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] ide/ide-tape: replace Nishanth Aravamudan
2004-09-17 18:25 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] macintosh/therm_windtunnel: Nishanth Aravamudan
2004-09-17 18:42 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] md/raid1: replace Nishanth Aravamudan
2004-09-20 23:15 ` Nishanth Aravamudan [this message]
2004-09-21 19:12 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] ide/ide-tape: replace maximilian attems
2004-09-21 20:40 ` Nishanth Aravamudan
2004-09-24 23:05 ` [Kernel-janitors] [PATCH 2.6.9-rc2 3/3] parport/parport_cs: replace Nishanth Aravamudan
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=20040920231507.GB2270@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
/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 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.