Commit 8f4a5aba authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds

[PATCH] ide/pmac: replace schedule_timeout() with msleep()

Use msleep() instead of schedule_timeout() to guarantee the desired delay.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 629b5e6d
...@@ -1126,11 +1126,9 @@ pmac_ide_do_resume(ide_hwif_t *hwif) ...@@ -1126,11 +1126,9 @@ pmac_ide_do_resume(ide_hwif_t *hwif)
if (!pmif->mediabay) { if (!pmif->mediabay) {
ppc_md.feature_call(PMAC_FTR_IDE_RESET, pmif->node, pmif->aapl_bus_id, 1); ppc_md.feature_call(PMAC_FTR_IDE_RESET, pmif->node, pmif->aapl_bus_id, 1);
ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, pmif->node, pmif->aapl_bus_id, 1); ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, pmif->node, pmif->aapl_bus_id, 1);
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout(HZ/100);
ppc_md.feature_call(PMAC_FTR_IDE_RESET, pmif->node, pmif->aapl_bus_id, 0); ppc_md.feature_call(PMAC_FTR_IDE_RESET, pmif->node, pmif->aapl_bus_id, 0);
set_current_state(TASK_UNINTERRUPTIBLE); msleep(jiffies_to_msecs(IDE_WAKEUP_DELAY));
schedule_timeout(IDE_WAKEUP_DELAY);
} }
/* Sanitize drive timings */ /* Sanitize drive timings */
...@@ -1208,11 +1206,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) ...@@ -1208,11 +1206,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
/* This is necessary to enable IDE when net-booting */ /* This is necessary to enable IDE when net-booting */
ppc_md.feature_call(PMAC_FTR_IDE_RESET, np, pmif->aapl_bus_id, 1); ppc_md.feature_call(PMAC_FTR_IDE_RESET, np, pmif->aapl_bus_id, 1);
ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, np, pmif->aapl_bus_id, 1); ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, np, pmif->aapl_bus_id, 1);
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout(HZ/100);
ppc_md.feature_call(PMAC_FTR_IDE_RESET, np, pmif->aapl_bus_id, 0); ppc_md.feature_call(PMAC_FTR_IDE_RESET, np, pmif->aapl_bus_id, 0);
set_current_state(TASK_UNINTERRUPTIBLE); msleep(jiffies_to_msecs(IDE_WAKEUP_DELAY));
schedule_timeout(IDE_WAKEUP_DELAY);
} }
/* Setup MMIO ops */ /* Setup MMIO ops */
......
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