From: Nishanth Aravamudan Subject: Re: [KJ] [announce] [patch] scsi/ide-scsi: use msleep() 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 Signed-off-by: Domen Puncer --- ide-scsi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: quilt/drivers/scsi/ide-scsi.c =================================================================== --- quilt.orig/drivers/scsi/ide-scsi.c +++ quilt/drivers/scsi/ide-scsi.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -1045,9 +1046,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 );