aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2005-06-27 18:24:31 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 20:36:41 -0400
commitc47abbbffd17a7e774ec1ef952a1c3621a9cb13b (patch)
tree553261e3b6f9c4b70d6574bed6e331ffef9c2cc4 /include/asm-i386
parentda9091ee3b5f9808c64abb925cefe7b100018614 (diff)
[PATCH] ide: sensible probing for PCI systems
Old ISA/VESA systems sometimes put tertiary IDE controllers at addresses 0x1e8, 0x168, 0x1e0 or 0x160. Linux thus probes these addresses on x86 systems. Unfortunately some PCI systems now use these addresses for other purposes which leads to users seeing minute plus hangs during boot or even crashes. The following patch (again has been in Fedora for a while) only probes the obscure legacy ISA ports on machinea that are pre-PCI. This seems to keep everyone happy and if there is someone with that utterly weird corner case the ide= command line still provides a get out of jail card. Unsurprisingly we've not found anyone so affected. Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/ide.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h
index 859ebf4da632..79dfab87135d 100644
--- a/include/asm-i386/ide.h
+++ b/include/asm-i386/ide.h
@@ -41,13 +41,17 @@ static __inline__ int ide_default_irq(unsigned long base)
41 41
42static __inline__ unsigned long ide_default_io_base(int index) 42static __inline__ unsigned long ide_default_io_base(int index)
43{ 43{
44 if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) {
45 switch(index) {
46 case 2: return 0x1e8;
47 case 3: return 0x168;
48 case 4: return 0x1e0;
49 case 5: return 0x160;
50 }
51 }
44 switch (index) { 52 switch (index) {
45 case 0: return 0x1f0; 53 case 0: return 0x1f0;
46 case 1: return 0x170; 54 case 1: return 0x170;
47 case 2: return 0x1e8;
48 case 3: return 0x168;
49 case 4: return 0x1e0;
50 case 5: return 0x160;
51 default: 55 default:
52 return 0; 56 return 0;
53 } 57 }