Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 17 Feb 2006 03:07:04 +0000 (GMT) Received: from sorrow.cyrius.com ([65.19.161.204]:61202 "EHLO sorrow.cyrius.com") by ftp.linux-mips.org with ESMTP id S8133620AbWBQDGw (ORCPT ); Fri, 17 Feb 2006 03:06:52 +0000 Received: by sorrow.cyrius.com (Postfix, from userid 10) id 1CD4464D3F; Fri, 17 Feb 2006 03:13:27 +0000 (UTC) Received: by deprecation.cyrius.com (Postfix, from userid 1000) id EEF068F77; Fri, 17 Feb 2006 03:13:24 +0000 (GMT) Date: Fri, 17 Feb 2006 03:13:24 +0000 From: Martin Michlmayr To: ralf@linux-mips.org Cc: linux-mips@linux-mips.org Subject: Re: [PATCH 2.6] Cobalt IDE fix, again Message-ID: <20060217031324.GJ23441@deprecation.cyrius.com> References: <20060125001303.GA2569@colonel-panic.org> <20060126171904.GA12850@deprecation.cyrius.com> <20060126175725.GA409@colonel-panic.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060126175725.GA409@colonel-panic.org> User-Agent: Mutt/1.5.11 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 10481 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: tbm@cyrius.com Precedence: bulk X-list: linux-mips Resending a patch that still needs to be applied. From: Peter Horton [MIPS] Fix long IDE detection delay by not scanning non-existent channels. 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 Acked-by: Alan Cox Signed-off-by: Martin Michlmayr --- ide.h | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) --- 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 23:41:19.000000000 +0000 @@ -30,7 +30,7 @@ #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 +38,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 +50,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 +83,8 @@ return 0x1e0; case 5: return 0x160; - default: - return 0; - } - else - return 0; + } + return 0; } #define IDE_ARCH_OBSOLETE_INIT -- Martin Michlmayr http://www.cyrius.com/