From owner-freebsd-net@FreeBSD.ORG Tue Jan 22 19:50:04 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469C316A419 for ; Tue, 22 Jan 2008 19:50:04 +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 3C5E813C459 for ; Tue, 22 Jan 2008 19:50:04 +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 m0MJo3q7023407 for ; Tue, 22 Jan 2008 19:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0MJo30l023406; Tue, 22 Jan 2008 19:50:03 GMT (envelope-from gnats) Date: Tue, 22 Jan 2008 19:50:03 GMT Message-Id: <200801221950.m0MJo30l023406@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Marius Strobl Cc: Subject: Re: kern/112654: [pcn] Kernel panic upon if_pcn module load on a Netfinity 5000 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Strobl List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 19:50:04 -0000 The following reply was made to PR kern/112654; it has been noted by GNATS. From: Marius Strobl To: bug-followup@freebsd.org Cc: Andy Farkas , wforms@Safe-mail.net Subject: Re: kern/112654: [pcn] Kernel panic upon if_pcn module load on a Netfinity 5000 Date: Tue, 22 Jan 2008 20:43:48 +0100 On Tue, Jan 22, 2008 at 07:23:17PM +0100, wforms@Safe-mail.net wrote: > New test was carried out today using Marius' patch (and not using Andy's patch at the same time). > The new kernel re-introduces the original problem, loading the if_pcn driver while the RJ45 cable is connected results in a kernel panic and the system reboots. While the cable is disconnected the if_pcn module loads fine, after which the cable can be plugged back and the card can be used as expected. > > ### Here is what shows up upon "kldload if_pcn" while the cable is unplugged ### > pcn0: port 0x2180-0x219f mem 0xfebff800-0xfebff81f > irq 17 at device 9.0 on pci0 > pcn0: Chip ID 2624 (Am79C972) > miibus5: on pcn0 > nsphyter0: on miibus5 > nsphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > ukphy0: on miibus5 > ukphy0: 10baseT, 10baseT-FDX, auto > pcn0: Ethernet address: 00:06:29:50:d9:9e > > ### At that point ifconfig says: ### > root@netfinity ~# ifconfig pcn0 > pcn0: flags=8802 mtu 1500 > ether 00:06:29:50:d9:9e > media: Ethernet autoselect (none) > status: no carrier > ### Then I connect the RJ45 cable coming from the switch and: ### > root@netfinity ~# ifconfig pcn0 > pcn0: flags=8802 mtu 1500 > ether 00:06:29:50:d9:9e > media: Ethernet autoselect (100baseTX ) > status: active > root@netfinity ~# > > > ### Now here is what "kldload if_pcn" does while the cable is connected: ### > pcn0: port 0x2180-0x219f mem 0xfebff800-0xfebff81f > irq 17 at device 9.0 on pci0 > pcn0: Chip ID 2624 (Am79C972) > miibus5: on pcn0 > nsphyter0: on miibus5 > nsphyter0: no media present > ifmedia_set: no match for 0x0/0xfffffff > panic: ifmedia_set > Could you please: 1) try again with the nsphyter patch already in place and http://people.freebsd.org/~marius/nsphyter.c copied on top of the existing src/sys/dev/mii/nsphyter.c? The new one uses the reset function from nsphy(4), which is about the only thing I can think of making the difference that a nsphy(4) hacked to attach to the DP83843 doesn't panic. 2) In case it also panics with the nsphyter.c provide a backtrace. Thanks, Marius