[kernel] r5591 -
dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches
Martin Michlmayr
tbm at costa.debian.org
Wed Jan 25 02:32:35 UTC 2006
Author: tbm
Date: Wed Jan 25 02:32:34 2006
New Revision: 5591
Modified:
dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/28_cobalt_ide.dpatch
Log:
the proper IDE fix
Modified: dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/28_cobalt_ide.dpatch
==============================================================================
--- dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/28_cobalt_ide.dpatch (original)
+++ dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/28_cobalt_ide.dpatch Wed Jan 25 02:32:34 2006
@@ -4,6 +4,13 @@
## DP: Fix long IDE detection delay by not scanning non-existent channels.
## DP: Not quite the right fix according to Alan Cox but it works(tm).
+# Fix long delay during Cobalt boot whilst scanning non-existent
+# interfaces. The logic is copied from i386 i.e. we only scan 2 legacy
+# ports if we have PCI IDE.
+
+# Signed-off-by: Peter Horton <pdh at colonel-panic.org>
+# Acked-by: Alan Cox <alan at lxorguk.ukuu.org.uk>
+
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
@@ -23,18 +30,102 @@
exit 0
-
-Index: linux.git/include/asm-mips/mach-cobalt/ide.h
+Index: linux.git/include/asm-mips/mach-generic/ide.h
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux.git/include/asm-mips/cobalt/ide.h 2006-01-22 23:17:03.000000000 +0000
-@@ -0,0 +1,8 @@
-+#ifndef __ASM_COBALT_IDE_H
-+#define __ASM_COBALT_IDE_H
-+
-+#define MAX_HWIFS 2
-+
-+#include <asm/mach-generic/ide.h>
-+
-+#endif
+--- linux.git.orig/include/asm-mips/mach-generic/ide.h 2006-01-24 22:07:36.000000000 +0000
++++ linux.git/include/asm-mips/mach-generic/ide.h 2006-01-24 22:10:43.000000000 +0000
+@@ -20,17 +20,9 @@
+ #include <linux/stddef.h>
+ #include <asm/processor.h>
+
+-#ifndef MAX_HWIFS
+-# ifdef CONFIG_BLK_DEV_IDEPCI
+-#define MAX_HWIFS 10
+-# else
+-#define MAX_HWIFS 6
+-# endif
+-#endif
+-
+ #define IDE_ARCH_OBSOLETE_DEFAULTS
+
+-static __inline__ int ide_probe_legacy(void)
++static __inline__ int ide_legacy_ports(void)
+ {
+ #ifdef CONFIG_PCI
+ struct pci_dev *dev;
+@@ -38,11 +30,11 @@
+ (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) {
+ pci_dev_put(dev);
+
+- return 1;
++ return 2;
+ }
+ return 0;
+ #elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
+- return 1;
++ return 6;
+ #else
+ return 0;
+ #endif
+@@ -50,30 +42,26 @@
+
+ static __inline__ int ide_default_irq(unsigned long base)
+ {
+- if (ide_probe_legacy())
+- switch (base) {
+- case 0x1f0:
+- return 14;
+- case 0x170:
+- return 15;
+- case 0x1e8:
+- return 11;
+- case 0x168:
+- return 10;
+- case 0x1e0:
+- return 8;
+- case 0x160:
+- return 12;
+- default:
+- return 0;
+- }
+- else
+- return 0;
++ switch (base) {
++ case 0x1f0:
++ return 14;
++ case 0x170:
++ return 15;
++ case 0x1e8:
++ return 11;
++ case 0x168:
++ return 10;
++ case 0x1e0:
++ return 8;
++ case 0x160:
++ return 12;
++ }
++ return 0;
+ }
+
+ static __inline__ unsigned long ide_default_io_base(int index)
+ {
+- if (ide_probe_legacy())
++ if (index < ide_legacy_ports())
+ switch (index) {
+ case 0:
+ return 0x1f0;
+@@ -87,11 +75,8 @@
+ return 0x1e0;
+ case 5:
+ return 0x160;
+- default:
+- return 0;
+- }
+- else
+- return 0;
++ }
++ return 0;
+ }
+
+ #define IDE_ARCH_OBSOLETE_INIT
More information about the Kernel-svn-changes
mailing list