Date: Thu, 29 Jan 1998 10:23:27 +0100 (CET)
From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
To: Roman Hodek <rnhodek@immd2.informatik.uni-erlangen.de>
cc: linux-m68k@lists.linux-m68k.org
Subject: Re: L68K: Fwd: Falcon IDE patch for 2.1.79
In-Reply-To: <199801280913.KAA12840@faui22c.informatik.uni-erlangen.de>

On Wed, 28 Jan 1998, Roman Hodek wrote:
> The patch below is by Martin Mitchell:
> 
> > Hi Roman!
> > 
> > Here is a quick patch for 2.1.79 on the Falcon, needed to boot with ide.
> > 
> > 	  Martin.
> > 
> 
> --- include/asm-m68k/ide.h.bak	Wed Jan 28 01:28:50 1998
> +++ include/asm-m68k/ide.h	Wed Jan 28 01:31:33 1998
> @@ -406,7 +406,11 @@
>  #endif /* CONFIG_ATARI */
>  }
>  
> +#ifdef CONFIG_AMIGA
>  #define ide_ack_intr(hwif) (hwif)->ack_intr((hwif))
> +#else
> +#define ide_ack_intr(hwif) (1)
> +#endif
>  
>  /*
>   * On the Atari, we sometimes can't enable interrupts:

This is a better fix, since it allows multi-machine kernels. I also found some
things that got lost and broke the support for other architectures :-(

--- m68k-2.1.79/include/asm-i386/ide.h.orig	Wed Dec 17 22:56:45 1997
+++ m68k-2.1.79/include/asm-i386/ide.h	Thu Jan 29 00:33:14 1998
@@ -85,6 +85,8 @@
 /*
  * The following are not needed for the non-m68k ports
  */
+#define ide_ack_intr(hwif)	(1)
+
 static __inline__ void ide_fix_driveid(struct hd_driveid *id)
 {
 }
--- m68k-2.1.79/include/asm-mips/ide.h.orig	Thu Jan 29 20:24:07 1998
+++ m68k-2.1.79/include/asm-mips/ide.h	Thu Jan 29 00:33:42 1998
@@ -85,6 +85,8 @@
 /*
  * The following are not needed for the non-m68k ports
  */
+#define ide_ack_intr(hwif)	(1)
+
 static __inline__ void ide_fix_driveid(struct hd_driveid *id)
 {
 }
--- m68k-2.1.79/include/asm-alpha/ide.h.orig	Wed Dec 17 22:56:45 1997
+++ m68k-2.1.79/include/asm-alpha/ide.h	Thu Jan 29 00:33:07 1998
@@ -85,6 +85,8 @@
 /*
  * The following are not needed for the non-m68k ports
  */
+#define ide_ack_intr(hwif)	(1)
+
 static __inline__ void ide_fix_driveid(struct hd_driveid *id)
 {
 }
--- m68k-2.1.79/include/asm-m68k/ide.h.orig	Sun Jan 25 22:36:35 1998
+++ m68k-2.1.79/include/asm-m68k/ide.h	Thu Jan 29 00:36:32 1998
@@ -406,7 +406,7 @@
 #endif /* CONFIG_ATARI */
 }
 
-#define ide_ack_intr(hwif) (hwif)->ack_intr((hwif))
+#define ide_ack_intr(hwif)	((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
 
 /*
  * On the Atari, we sometimes can't enable interrupts:
--- m68k-2.1.79/include/asm-ppc/ide.h.orig	Tue Jan 13 19:11:45 1998
+++ m68k-2.1.79/include/asm-ppc/ide.h	Thu Jan 29 00:33:51 1998
@@ -135,9 +135,15 @@
 /*
  * The following are not needed for the non-m68k ports
  */
-#define ide_ack_intr(hwif)		(1)
-#define ide_release_lock(lock)		do {} while (0)
-#define ide_get_lock(lock, hdlr, data)	do {} while (0)
+#define ide_ack_intr(hwif)	(1)
+
+static __inline__ void ide_release_lock (int *ide_lock)
+{
+}
+
+static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *, struct pt_regs *), void *data)
+{
+}
 
 #endif /* __KERNEL__ */
 

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

