From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 20 19:40:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5D0C16A404 for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F41513C4DD for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1KJe2qS054881 for ; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1KJe28T054880; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from gnats) Resent-Date: Wed, 20 Feb 2008 19:40:02 GMT Resent-Message-Id: <200802201940.m1KJe28T054880@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, Peter Much Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE0B816A403 for ; Wed, 20 Feb 2008 19:33:40 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2F73313C45B for ; Wed, 20 Feb 2008 19:33:39 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp@uucp.dinoex.sub.de [194.45.71.2] (may be forged)) by uucp.dinoex.sub.de (8.14.1/8.14.0) with ESMTP id m1KJ2qPD086115 for ; Wed, 20 Feb 2008 20:02:52 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.14.1/8.14.0/Submit) with UUCP id m1KJ2pcP086114 for FreeBSD-gnats-submit@freebsd.org; Wed, 20 Feb 2008 20:02:51 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.13.6/8.13.6) with ESMTP id m1KImR5m037965 for ; Wed, 20 Feb 2008 19:48:27 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.13.6/8.13.6) with ESMTP id m1KIlIQw037893 for ; Wed, 20 Feb 2008 19:47:19 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.13.6/8.13.6/Submit) id m1KIlI3E037892; Wed, 20 Feb 2008 19:47:18 +0100 (CET) (envelope-from peter) Message-Id: <200802201847.m1KIlI3E037892@gate.oper.dinoex.org> Date: Wed, 20 Feb 2008 19:47:18 +0100 (CET) From: Peter Much To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/120915: GENERIC does not boot: if_de is broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Peter Much List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:40:03 -0000 >Number: 120915 >Category: kern >Synopsis: GENERIC does not boot: if_de is broken >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 20 19:40:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Peter Much >Release: FreeBSD 6.3-RELEASE-p1 i386 >Organization: n/a >Environment: kernel: FreeBSD 6.3-RELEASE-p1 de0: port 0xa000-0xa07f mem 0xf4800000-0xf480007f at device 13.0 on pci0 de0: SMC 8432BT 21040 [10Mb/s] pass 2.3 >Description: After upgrade from 5.5 to 6.3 kernel has pagefault on boot. kernel.GENERIC has the same problem. Location: tulip_txput+0x1eb Backtrace (more or less, due to optimization): device_attach -> tulip_pci_attach -> tulip_reset -> tulip_media_select -> tulip_txprobe -> tulip_txput compiling a kernel without if_de will help (depending on the definition of "help"), but when loading if_de.ko the pagefault is here again. >How-To-Repeat: Try to boot generic with the appropriate netif card. >Fix: The problem seems to be that during attach a mediaselect is done, during mediaselect a testpacket is sent and during packetsend the BPF is fed - but at that point of the attach the BPF structure seems not yet available - which is nowhere checked. Patch (see below) helps for me, while I do not know if this is now the way things should be done. And what I do not really understand is how such a thing can go undetected for seemingly two+ years, as it is practically a "can-not-work-by-design" condition. *** sys/pci/if_de.c.orig Wed Feb 20 18:37:57 2008 --- sys/pci/if_de.c Wed Feb 20 19:00:09 2008 *************** *** 4041,4047 **** /* * bounce a copy to the bpf listener, if any. */ ! BPF_MTAP(sc->tulip_ifp, m); /* * The descriptors have been filled in. Now get ready --- 4041,4048 ---- /* * bounce a copy to the bpf listener, if any. */ ! if(sc->tulip_ifp->if_bpf != NULL) ! BPF_MTAP(sc->tulip_ifp, m); /* * The descriptors have been filled in. Now get ready *************** *** 4403,4408 **** --- 4404,4410 ---- /* XXX: driver name/unit should be set some other way */ if_initname(ifp, "de", sc->tulip_unit); + ifp->if_bpf = NULL; ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST; ifp->if_ioctl = tulip_ifioctl; >Release-Note: >Audit-Trail: >Unformatted: