2004-09-24 01:46:13

by maximilian attems

[permalink] [raw]
Subject: [patch 3/9] block/cciss: replace schedule_timeout() with msleep_interruptible()




Any comments would be appreciated. This is a re-push of a patch I
submitted 19 July which hasn't been merged as of
2.6.9-rc1-mm5/2.6.9-rc2.

Description: msleep_interruptible() is used instead of schedule_timeout()
to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <[email protected]>

Signed-off-by: Maximilian Attems <[email protected]>
---

linux-2.6.9-rc2-bk7-max/drivers/block/cciss.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/block/cciss.c~msleep_interruptible-drivers_block_cciss drivers/block/cciss.c
--- linux-2.6.9-rc2-bk7/drivers/block/cciss.c~msleep_interruptible-drivers_block_cciss 2004-09-21 21:07:51.000000000 +0200
+++ linux-2.6.9-rc2-bk7-max/drivers/block/cciss.c 2004-09-21 21:07:51.000000000 +0200
@@ -2381,8 +2381,7 @@ static int cciss_pci_init(ctlr_info_t *c
scratchpad = readl(c->vaddr + SA5_SCRATCHPAD_OFFSET);
if (scratchpad == CCISS_FIRMWARE_READY)
break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10); /* wait 100ms */
+ msleep_interruptible(100);
}
if (scratchpad != CCISS_FIRMWARE_READY) {
printk(KERN_WARNING "cciss: Board not ready. Timed out.\n");
_