[PATCH] IDE fix

From: dhowells
Date: Mon Nov 08 2004 - 09:50:48 EST


The attached patch fixes the IDE driver to initialise correctly in the case
that IDE_ARCH_OBSOLETE_INIT is not defined. Not defining this macro would seem
to be the correct thing to do since it includes the word "obsolete" in its
name.

Signed-Off-By: dhowells@xxxxxxxxxx
---
diffstat ide-2610rc1mm3.diff
setup-pci.c | 5 +++++
1 files changed, 5 insertions(+)

diff -uNrp /warthog/kernels/linux-2.6.10-rc1-mm3/drivers/ide/setup-pci.c linux-2.6.10-rc1-mm3-frv/drivers/ide/setup-pci.c
--- /warthog/kernels/linux-2.6.10-rc1-mm3/drivers/ide/setup-pci.c 2004-11-05 13:15:28.000000000 +0000
+++ linux-2.6.10-rc1-mm3-frv/drivers/ide/setup-pci.c 2004-11-05 14:13:03.714511735 +0000
@@ -425,7 +425,12 @@ static ide_hwif_t *ide_hwif_configure(st
if (hwif->io_ports[IDE_DATA_OFFSET] != base ||
hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
memset(&hwif->hw, 0, sizeof(hwif->hw));
+#ifndef IDE_ARCH_OBSOLETE_INIT
+ ide_std_init_ports(&hwif->hw, base, (ctl | 2));
+ hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0;
+#else
ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL);
+#endif
memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/