From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 7 22:50:05 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1B2816A420 for ; Tue, 7 Mar 2006 22:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9579843D49 for ; Tue, 7 Mar 2006 22:50:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k27Mo3Kf068325 for ; Tue, 7 Mar 2006 22:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k27Mo379068323; Tue, 7 Mar 2006 22:50:03 GMT (envelope-from gnats) Resent-Date: Tue, 7 Mar 2006 22:50:03 GMT Resent-Message-Id: <200603072250.k27Mo379068323@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, John Hood , ni-bugs@sandstorm.net Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5554416A420 for ; Tue, 7 Mar 2006 22:41:01 +0000 (GMT) (envelope-from jh@sirocco.sandstorm.net) Received: from sirocco.sandstorm.net (ip-69-33-111-75.bos.megapath.net [69.33.111.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3A5643D78 for ; Tue, 7 Mar 2006 22:40:48 +0000 (GMT) (envelope-from jh@sirocco.sandstorm.net) Received: from sirocco.sandstorm.net (localhost [127.0.0.1]) by sirocco.sandstorm.net (8.13.3/8.13.3) with ESMTP id k27MdMjC065631; Tue, 7 Mar 2006 17:39:22 -0500 (EST) (envelope-from jh@sirocco.sandstorm.net) Received: (from jh@localhost) by sirocco.sandstorm.net (8.13.3/8.13.3/Submit) id k27MdLeM065630; Tue, 7 Mar 2006 17:39:21 -0500 (EST) (envelope-from jh) Message-Id: <200603072239.k27MdLeM065630@sirocco.sandstorm.net> Date: Tue, 7 Mar 2006 17:39:21 -0500 (EST) From: John Hood To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: John Hood , ni-bugs@sandstorm.net Subject: kern/94196: [dc] if_dc panics on bad hardware X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Hood , ni-bugs@sandstorm.net List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 22:50:05 -0000 >Number: 94196 >Category: kern >Synopsis: [dc] if_dc panics on bad hardware >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 07 22:50:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: john hood >Release: FreeBSD 6.0-RELEASE i386 >Organization: Sandstorm Enterprises >Environment: Software: FreeBSD (Sandstorm internal machine) 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 Hardware: Intel D845EPT2 motherboard in a 2U box with a 3-slot riser card; the riser card has little paddleboards to pick off slot-geographic signals on 2 other motherboard slots (the motherboard is not designed for a riser card). A Netgear FA310TX ethercard and an Intel 82559-family card are installed on the riser. One of the little paddle boards is not fully seated... Software: 6.0-RELEASE install CD >Description: Kernel panics during boot when probing a misfunctioning Netgear FA310TX card. >How-To-Repeat: By examination, mostly. Unfortunately, the the problem went away when the paddleboard was reseated. Reproduce above hardware configuration, such that a card probed by the dc driver responds to PCI config-space reads/writes, but fails to operate normally when the driver tries to reset it. Boot 6.0 install CD, observe panic. Boot 5.3 install CD, observe dc printing a message, failing to attach, and the system otherwise continuing normally. Examine stack trace of debug kernel, note that the kernel has paniced with a null-pointer dereference under if_printf(sc->dc_ifp, "reset never completed!\n"); in dc_reset(), from dc_attach(). Alternately, one could alter dc_reset() so that it always calls if_printf() and boot the resulting kernel on any system with a dc-driven card. Sorry about the lack of a concrete report. If you have trouble understanding/reproducing the problem, I can generate a proper report with stack trace, but it should be fairly obvious on examination. >Fix: Make sure your hardware works... Looks like the bug was introduced with 1.163, where if_printf() was substituted for printf(). dc_attach() does not set sc->dc_ifp until after dc_reset() is called. Things need to be rearranged so dc_reset doesn't have this dependency or sc->dc_ifp is set before it's called. I haven't looked. but it's been suggested that this may be a problem in other drivers, if similar changes have been made. The original author (jhb) should review this problem. >Release-Note: >Audit-Trail: >Unformatted: