Re: PATCH: (Discussion) Stop IDE legacy ISA probes on PCI systems

From: Coywolf Qi Hunt
Date: Mon Dec 27 2004 - 22:59:21 EST


This should solve the problem.

coywolf


--- linux-2.6.10/include/asm-i386/ide.h 2004-10-19 05:53:13.000000000 +0800
+++ linux-2.6.10-cy/include/asm-i386/ide.h 2004-12-28
11:45:38.000000000 +0800
@@ -44,13 +44,18 @@ static __inline__ unsigned long ide_defa
switch (index) {
case 0: return 0x1f0;
case 1: return 0x170;
- case 2: return 0x1e8;
- case 3: return 0x168;
- case 4: return 0x1e0;
- case 5: return 0x160;
- default:
- return 0;
}
+
+ if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) {
+ switch (index) {
+ case 2: return 0x1e8;
+ case 3: return 0x168;
+ case 4: return 0x1e0;
+ case 5: return 0x160;
+ }
+ }
+
+ return 0;
}

#define IDE_ARCH_OBSOLETE_INIT


On Mon, 27 Dec 2004 16:29:52 -0800 (PST), Linus Torvalds
<torvalds@xxxxxxxx> wrote:
>
>
> On Mon, 27 Dec 2004, Adam Sampson wrote:
> >
> > I don't think that code will have the intended effect, unless your
> > GCC has some funny ideas about switch statements...
>
> Indeed. That if-statement is unreachable and has no effect.
>
> Linus
> -

--
Coywolf Qi Hunt
Homepage http://sosdg.org/~coywolf/
-
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/