Resent-Date: Sun, 22 Aug 1999 00:49:14 +0200 (MET DST)
Date: Sat, 21 Aug 1999 19:05:39 +0200 (CEST)
From: Geert Uytterhoeven <geert@geert.cs.kuleuven.ac.be>
Reply-To: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jes Sorensen <Jes.Sorensen@cern.ch>
cc: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: Ariadne re-entrance bug found!
Resent-From: linux-m68k@phil.uni-sb.de


While playing with the Ariadne driver to add resource handling and cleaning up
the driver, I found the bug that causes the `Re-entering the interrupt handler'
messages. The code looks like:

|     if (!(board->Lance.RDP & INTR))     /* Check if any interrupt has been
|         return;                            generated by the board. */
|   
|     if (dev->interrupt)
|         printk("%s: Re-entering the interrupt handler.\n", dev->name);

Yes, the `return' is inside the comment :-(

Quick fix:

--- drivers/net/ariadne.c.orig	Fri Aug 20 23:42:48 1999
+++ drivers/net/ariadne.c	Sat Aug 21 19:04:10 1999
@@ -400,8 +400,8 @@
 
     board->Lance.RAP = CSR0;	/* PCnet-ISA Controller Status */
 
-    if (!(board->Lance.RDP & INTR))	/* Check if any interrupt has been
-	return;				   generated by the board. */
+    if (!(board->Lance.RDP & INTR))	/* Check if any interrupt has been */
+	return;				/* generated by the board. */
 
     if (dev->interrupt)
 	printk("%s: Re-entering the interrupt handler.\n", dev->name);

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

