Date: Wed, 20 Feb 2008 19:47:18 +0100 (CET) From: Peter Much <pmc@citylink.dinoex.sub.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/120915: GENERIC does not boot: if_de is broken Message-ID: <200802201847.m1KIlI3E037892@gate.oper.dinoex.org> Resent-Message-ID: <200802201940.m1KJe28T054880@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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: <Digital 21040 Ethernet> 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802201847.m1KIlI3E037892>