Module Name:    src
Committed By:   dyoung
Date:           Mon Mar 22 22:25:26 UTC 2010

Modified Files:
        src/sys/dev/isa: i82365_isasubr.c

Log Message:
Do not disestablish the interrupt handler inside of the interrupt
handler!  Stops a crash on the HP Pavilion N3270.

Cosmetic: sc->ih is a pointer, so set to NULL instead of 0.  Compare
with NULL instead of testing truth.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/isa/i82365_isasubr.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/dev/isa/i82365_isasubr.c
diff -u src/sys/dev/isa/i82365_isasubr.c:1.45 src/sys/dev/isa/i82365_isasubr.c:1.46
--- src/sys/dev/isa/i82365_isasubr.c:1.45	Thu Sep 17 18:14:41 2009
+++ src/sys/dev/isa/i82365_isasubr.c	Mon Mar 22 22:25:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: i82365_isasubr.c,v 1.45 2009/09/17 18:14:41 tsutsui Exp $	*/
+/*	$NetBSD: i82365_isasubr.c,v 1.46 2010/03/22 22:25:26 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2000 Christian E. Hopps.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82365_isasubr.c,v 1.45 2009/09/17 18:14:41 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82365_isasubr.c,v 1.46 2010/03/22 22:25:26 dyoung Exp $");
 
 #define	PCICISADEBUG
 
@@ -155,9 +155,6 @@
 	 * unhandled level interrupts
 	 */
 	if (++sc->intr_false > 40) {
-		isa_intr_disestablish(isc->sc_ic, sc->ih);
-		sc->ih = 0;
-
 		pcic_write(h, PCIC_CSC_INTR, 0);
 		delay(10);
 	}
@@ -251,9 +248,9 @@
 			mask |= (1 << i);
 		}
 
-		if (sc->ih) {
+		if (sc->ih != NULL) {
 			isa_intr_disestablish(ic, sc->ih);
-			sc->ih = 0;
+			sc->ih = NULL;
 
 			pcic_write(h, PCIC_CSC_INTR, 0);
 			delay(10);

Reply via email to