From owner-freebsd-current@FreeBSD.ORG Tue Dec 27 00:12:33 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B588716A41F for ; Tue, 27 Dec 2005 00:12:33 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D299F43D70 for ; Tue, 27 Dec 2005 00:12:31 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id jBR0CTO2004204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Dec 2005 03:12:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id jBR0CTf8004203; Tue, 27 Dec 2005 03:12:29 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 27 Dec 2005 03:12:29 +0300 From: Gleb Smirnoff To: "Martin P. Hansen" Message-ID: <20051227001229.GF1496@FreeBSD.org> References: <20051224160047.GA40553@echobase.hoth.dk> <20051224235153.GA46187@echobase.hoth.dk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <20051224235153.GA46187@echobase.hoth.dk> User-Agent: Mutt/1.5.6i Cc: freebsd-current@FreeBSD.org Subject: Re: if_dc.c causes page fault while in kernel mode; coredump; reproducible X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 00:12:33 -0000 --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--