Commit 83c6737c authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ide-pmac logic fix

This patch fixes a logic error in the ide-pmac driver which could try to
access the chip's fcr register after the cell clock has been shut down,
thus causing a machine check on machines with the "Intrepid" chipset.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b6a22cd4
...@@ -1208,16 +1208,17 @@ pmac_ide_do_suspend(ide_hwif_t *hwif) ...@@ -1208,16 +1208,17 @@ pmac_ide_do_suspend(ide_hwif_t *hwif)
if (pmif->mediabay) if (pmif->mediabay)
return 0; return 0;
/* Disable the bus */ /* Kauai has bus control FCRs directly here */
ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, pmif->node, pmif->aapl_bus_id, 0);
/* Kauai has it different */
if (pmif->kauai_fcr) { if (pmif->kauai_fcr) {
u32 fcr = readl(pmif->kauai_fcr); u32 fcr = readl(pmif->kauai_fcr);
fcr &= ~(KAUAI_FCR_UATA_RESET_N | KAUAI_FCR_UATA_ENABLE); fcr &= ~(KAUAI_FCR_UATA_RESET_N | KAUAI_FCR_UATA_ENABLE);
writel(fcr, pmif->kauai_fcr); writel(fcr, pmif->kauai_fcr);
} }
/* Disable the bus on older machines and the cell on kauai */
ppc_md.feature_call(PMAC_FTR_IDE_ENABLE, pmif->node, pmif->aapl_bus_id,
0);
return 0; return 0;
} }
......
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