Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Remove set_current_state() as it is taken care of by msleep().
Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/drivers/scsi/ide-scsi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/scsi/ide-scsi.c~msleep-drivers_scsi_ide-scsi drivers/scsi/ide-scsi.c --- kj/drivers/scsi/ide-scsi.c~msleep-drivers_scsi_ide-scsi 2005-03-05 16:10:50.000000000 +0100 +++ kj-domen/drivers/scsi/ide-scsi.c 2005-03-05 16:10:50.000000000 +0100 @@ -46,6 +46,7 @@ #include <linux/slab.h> #include <linux/ide.h> #include <linux/scatterlist.h> +#include <linux/delay.h> #include <asm/io.h> #include <asm/bitops.h> @@ -979,9 +980,8 @@ static int idescsi_eh_reset (struct scsi /* ide_do_reset starts a polling handler which restarts itself every 50ms until the reset finishes */ do { - set_current_state(TASK_UNINTERRUPTIBLE); spin_unlock_irq(cmd->device->host->host_lock); - schedule_timeout(HZ/20); + msleep(50); spin_lock_irq(cmd->device->host->host_lock); } while ( HWGROUP(drive)->handler ); _ - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html