* [Kernel-janitors] [PATCH 2.6.9-rc2 6/16] scsi/mesh: replace
@ 2004-09-27 18:20 Nishanth Aravamudan
0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2004-09-27 18:20 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
Any comments would be appreciated.
Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected.
--- 2.6.9-rc2-vanilla/drivers/scsi/mesh.c 2004-09-13 17:16:01.000000000 -0700
+++ 2.6.9-rc2/drivers/scsi/mesh.c 2004-09-14 09:11:59.000000000 -0700
@@ -388,8 +388,7 @@ static void mesh_init(struct mesh_state
mesh_flush_io(mr);
/* Wait for bus to come back */
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout((init_reset_delay * HZ) / 1000);
+ msleep(init_reset_delay);
}
/* Reconfigure controller */
@@ -1749,12 +1748,10 @@ static void set_mesh_power(struct mesh_s
return;
if (state) {
pmac_call_feature(PMAC_FTR_MESH_ENABLE, macio_get_of_node(ms->mdev), 0, 1);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/5);
+ msleep(200);
} else {
pmac_call_feature(PMAC_FTR_MESH_ENABLE, macio_get_of_node(ms->mdev), 0, 0);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/100);
+ msleep(10);
}
}
@@ -1772,8 +1769,7 @@ static int mesh_suspend(struct macio_dev
spin_lock_irqsave(ms->host->host_lock, flags);
while(ms->phase != idle) {
spin_unlock_irqrestore(ms->host->host_lock, flags);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(HZ/100);
+ msleep(10);
spin_lock_irqsave(ms->host->host_lock, flags);
}
ms->phase = sleeping;
[-- 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] only message in thread
only message in thread, other threads:[~2004-09-27 18:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 18:20 [Kernel-janitors] [PATCH 2.6.9-rc2 6/16] scsi/mesh: replace Nishanth Aravamudan
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.