Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Peter Horton <pdh@p4-3018.uk2net.com>
To: Martin Michlmayr <tbm@cyrius.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 2.6] Cobalt IDE fix, again
Date: Thu, 26 Jan 2006 17:57:25 +0000	[thread overview]
Message-ID: <20060126175725.GA409@colonel-panic.org> (raw)
In-Reply-To: <20060126171904.GA12850@deprecation.cyrius.com>

On Thu, Jan 26, 2006 at 05:19:04PM +0000, Martin Michlmayr wrote:
> now I get:
> 
> drivers/ide/mips/swarm.c: In function ???swarm_ide_probe???:
> drivers/ide/mips/swarm.c:78: error: ???CONFIG_IDE_MAX_HWIFS??? undeclared (first use in this function)
> drivers/ide/mips/swarm.c:78: error: (Each undeclared identifier is reported only once
> drivers/ide/mips/swarm.c:78: error: for each function it appears in.)
> 

Bum, I munged the patch. Fixed patch below ...

P.

Index: linux.git/include/asm-mips/mach-generic/ide.h
===================================================================
--- 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

  reply	other threads:[~2006-01-26 17:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25  0:13 [PATCH 2.6] Cobalt IDE fix, again Peter Horton
2006-01-25  0:19 ` Alan Cox
2006-01-26 17:19 ` Martin Michlmayr
2006-01-26 17:57   ` Peter Horton [this message]
2006-02-17  3:13     ` Martin Michlmayr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060126175725.GA409@colonel-panic.org \
    --to=pdh@p4-3018.uk2net.com \
    --cc=linux-mips@linux-mips.org \
    --cc=pdh@colonel-panic.org \
    --cc=ralf@linux-mips.org \
    --cc=tbm@cyrius.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox