Module Name:    src
Committed By:   bouyer
Date:           Mon May 11 19:31:40 UTC 2009

Modified Files:
        src/sys/arch/mac68k/conf [netbsd-4]: GENERIC
        src/sys/arch/mac68k/obio [netbsd-4]: esp.c

Log Message:
Pull up following revision(s) (requested by hauke in ticket #1315):
        sys/arch/mac68k/obio/esp.c: revision 1.51 via patch
        sys/arch/mac68k/conf/GENERIC: revision 1.188
Add LOCKDEBUG option, commented out, so that people know it's there.
esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().
Fixes PR mac68k/38758.


To generate a diff of this commit:
cvs rdiff -u -r1.177.2.2 -r1.177.2.3 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.44 -r1.44.14.1 src/sys/arch/mac68k/obio/esp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.177.2.2 src/sys/arch/mac68k/conf/GENERIC:1.177.2.3
--- src/sys/arch/mac68k/conf/GENERIC:1.177.2.2	Sat Aug 25 09:00:08 2007
+++ src/sys/arch/mac68k/conf/GENERIC	Mon May 11 19:31:40 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.177.2.2 2007/08/25 09:00:08 liamjfoy Exp $
+# $NetBSD: GENERIC,v 1.177.2.3 2009/05/11 19:31:40 bouyer Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.177.2.2 $"
+#ident 		"GENERIC-$Revision: 1.177.2.3 $"
 
 maxusers	16		# estimated number of users
 
@@ -69,6 +69,7 @@
 # Diagnostic/debugging support options
 #options 	DIAGNOSTIC	# cheap kernel consistency checks
 #options 	DEBUG		# expensive debugging checks/support
+#options 	LOCKDEBUG	# kernel lock debugging
 options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
 options 	DDB			# in-kernel debugger
 #options 	DDB_HISTORY_SIZE=100	# enable history editing in DDB

Index: src/sys/arch/mac68k/obio/esp.c
diff -u src/sys/arch/mac68k/obio/esp.c:1.44 src/sys/arch/mac68k/obio/esp.c:1.44.14.1
--- src/sys/arch/mac68k/obio/esp.c:1.44	Wed Mar  8 23:46:23 2006
+++ src/sys/arch/mac68k/obio/esp.c	Mon May 11 19:31:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: esp.c,v 1.44 2006/03/08 23:46:23 lukem Exp $	*/
+/*	$NetBSD: esp.c,v 1.44.14.1 2009/05/11 19:31:39 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1997 Jason R. Thorpe.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.44 2006/03/08 23:46:23 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.44.14.1 2009/05/11 19:31:39 bouyer Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -851,7 +851,14 @@
 		printf("g!\n");
 	}
 #endif
+	/*
+	 * We have been called from the MI ncr53c9x_intr() handler,
+	 * which protects itself against multiple invocation with a
+	 * simple_lock. Follow the example of ncr53c9x_poll().
+	 */
+	simple_unlock(&sc->sc_lock);
 	ncr53c9x_intr(sc);
+	simple_lock(&sc->sc_lock);
 	if (espspl != -1) splx(espspl); espspl = -1;
 }
 

Reply via email to