Commit 23508b81 authored by Jeff Garzik's avatar Jeff Garzik

[libata promise] make sure our schedule_timeout(N) are never with N==0

Make sure we delay for a minimum desired length of time.
parent 74c79f5a
...@@ -509,7 +509,7 @@ static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe) ...@@ -509,7 +509,7 @@ static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe)
readl(mmio + PDC_TBG_MODE); /* flush */ readl(mmio + PDC_TBG_MODE); /* flush */
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(msecs_to_jiffies(10)); schedule_timeout(msecs_to_jiffies(10) + 1);
/* adjust slew rate control register. */ /* adjust slew rate control register. */
tmp = readl(mmio + PDC_SLEW_CTL); tmp = readl(mmio + PDC_SLEW_CTL);
......
...@@ -1118,8 +1118,8 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe) ...@@ -1118,8 +1118,8 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe)
error = 0; error = 0;
break; break;
} }
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((i * 100) * HZ / 1000); schedule_timeout((i * 100) * HZ / 1000 + 1);
} }
return error; return error;
} }
......
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