Commit 02c266a4 authored by Maximilian Attems's avatar Maximilian Attems Committed by Dave Jones

[PATCH] scsi/sata_sx4: replace schedule_timeout() with

Use msleep() instead of schedule_timeout() to
guarantee the task delays for the desired time.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent c94f08ef
...@@ -1189,8 +1189,7 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe) ...@@ -1189,8 +1189,7 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe)
error = 0; error = 0;
break; break;
} }
set_current_state(TASK_UNINTERRUPTIBLE); msleep(i*100);
schedule_timeout((i * 100) * HZ / 1000 + 1);
} }
return error; return error;
} }
...@@ -1223,8 +1222,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe) ...@@ -1223,8 +1222,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe)
readl(mmio + PDC_TIME_CONTROL); readl(mmio + PDC_TIME_CONTROL);
/* Wait 3 seconds */ /* Wait 3 seconds */
set_current_state(TASK_UNINTERRUPTIBLE); msleep(3000);
schedule_timeout(3 * HZ);
/* /*
When timer is enabled, counter is decreased every internal When timer is enabled, counter is decreased every internal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment