Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2005 03:12:29 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        "Martin P. Hansen" <mph@lima.dyndns.dk>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: if_dc.c causes page fault while in kernel mode; coredump; reproducible
Message-ID:  <20051227001229.GF1496@FreeBSD.org>
In-Reply-To: <20051224235153.GA46187@echobase.hoth.dk>
References:  <20051224160047.GA40553@echobase.hoth.dk> <a78074950512241023p54375bbera719851ea2f6140c@mail.gmail.com> <20051224235153.GA46187@echobase.hoth.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline

  Martin,

  please try out the attached patch.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="if_dc.c.diff"

Index: if_dc.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/dc/if_dc.c,v
retrieving revision 1.176
diff -u -r1.176 if_dc.c
--- if_dc.c	5 Dec 2005 12:32:20 -0000	1.176
+++ if_dc.c	27 Dec 2005 00:10:54 -0000
@@ -3138,8 +3138,9 @@
 	/* Disable interrupts. */
 	CSR_WRITE_4(sc, DC_IMR, 0x00000000);
 
-	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS)
-	      && status != 0xFFFFFFFF) {
+	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) &&
+	    status != 0xFFFFFFFF &&
+	    ifp->if_drv_flags & IFF_DRV_RUNNING) {
 
 		CSR_WRITE_4(sc, DC_ISR, status);
 

--3V7upXqbjpZ4EhLz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051227001229.GF1496>