From owner-freebsd-bugs@FreeBSD.ORG Mon May 14 13:40:03 2007 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 [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DCBE16A407 for ; Mon, 14 May 2007 13:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id E089513C455 for ; Mon, 14 May 2007 13: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.13.4/8.13.4) with ESMTP id l4EDe23p055576 for ; Mon, 14 May 2007 13:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4EDe2WS055573; Mon, 14 May 2007 13:40:02 GMT (envelope-from gnats) Resent-Date: Mon, 14 May 2007 13:40:02 GMT Resent-Message-Id: <200705141340.l4EDe2WS055573@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, Keve Nagy Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 431FB16A403 for ; Mon, 14 May 2007 13:33:34 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 2696413C458 for ; Mon, 14 May 2007 13:33:34 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4EDXX6Z001879 for ; Mon, 14 May 2007 13:33:34 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l4EDSWnX094608; Mon, 14 May 2007 13:28:32 GMT (envelope-from nobody) Message-Id: <200705141328.l4EDSWnX094608@www.freebsd.org> Date: Mon, 14 May 2007 13:28:32 GMT From: Keve Nagy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/112655: Kernel panic upon if_pcn module load on a Netfinity 5000 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 13:40:03 -0000 >Number: 112655 >Category: kern >Synopsis: Kernel panic upon if_pcn module load on a Netfinity 5000 >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: Mon May 14 13:40:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Keve Nagy >Release: FreeBSD/i386 6.2-RELEASE-p4 >Organization: N/A >Environment: FreeBSD/i386 6.2-RELEASE-p4, IBM Netfinity 5000 2x500MHz PIII CPU with 512MB RAM. >Description: I experienced a serious trouble with the if_pcn.ko kernel module under FreeBSD/i386 6.2-RELEASE-p4 on an IBM Netfinity 5000 (dual PIII). This machine has an integrated ethernet port on the main board. Upon loading the if_pcn ethernet driver module, if the RJ45 cable is connected then some sort of kernel panic occurs and the system stops/reboots. However, with the RJ45 cable being disconnected from the integrated ethernet socket the if_pcn driver loads perfectly fine and then the cable can be connected and the interface be used with no problems at all. This happens regardless of the if_pcn driver being compiled into the kernel or being loaded from loader.conf or simply from the command line with kldload. Same behaviour under 6.2-RELEASE and 6.2-RELEASE-p3, 6.2-RELEASE-p4. (1) This below is displayed on boot just before the panic occurs: pcn0: port 0x2180-0x219f mem 0xfebfdc00-0xfebfdc1f irq 17 at device 9.0 on pci0 pcn0: Chip ID 2624 (Am79C972) miibus3: on pcn0 ukphy0: on miibus3 ukphy0: ifmedia_set: no match for 0x0/0xfffffff panic: ifmedia_set cpuid = 0 Uptime: 29m57s Cannot dump. No dump device defined. Automatic reboot in 15 seconds - press a key on the console to abort (2) This below is the corresponding screen message when there is no cable connected to the interface: pcn0: port 0x2180-0x219f mem 0xfebfdc00-0xfebfdc1f irq 17 at device 9.0 on pci0 pcn0: Chip ID 2624 (Am79C972) miibus3: on pcn0 ukphy0: on miibus3 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcn0: Ethernet address: 00:06:29:50:d9:9e With the RJ45 ethernet cable disconnected, the driver module loads fine and the interface can be used as usual. Here is the ifconfig pcn0 output on my Netfinity 5000 right after the module is successfully loaded with the cable disconnected: pcn0: flags=8802 mtu 1500 ether 00:06:29:50:d9:9e media: Ethernet autoselect (none) status: no carrier Now the cable can be connected and pcn0 works as any usual ethernet interface: pcn0: flags=8802 mtu 1500 ether 00:06:29:50:d9:9e media: Ethernet autoselect (100baseTX ) status: active I also tested this hardware with a Debian based Linux distro (uhu-linux 2.0): uname -a Linux localhost 2.6.17.6-10 #1 SMP Mon Aug 21 11:06:08 CEST 2006 i686 UHU-Linux This is what its dmesg showed after booting with the cable being CONNECTED: .. [17179618.492000] pcnet32.c:v1.32 18.Mar.2006 tsbogend@alpha.franken.de [17179618.492000] ACPI: PCI Interrupt Link [LKNE] enabled at IRQ 17 [17179618.492000] ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LKNE] -> GSI 17 (level, low) -> IRQ 209 [17179618.492000] pcnet32: PCnet/FAST+ 79C972 at 0x2180, 00 06 29 50 d9 9e [17179618.496000] tx_start_pt(0x0c00):~220 bytes, BCR18(9a61):BurstWrEn BurstRdEn NoUFlow [17179618.496000] SRAMSIZE=0x1700, SRAM_BND=0x0800, assigned IRQ 209. [17179618.496000] pcnet32: Found PHY 2000:5c10 at address 1. [17179618.496000] eth3: registered as PCnet/FAST+ 79C972 [17179618.496000] pcnet32: 1 cards_found. [17179619.152000] Floppy drive(s): fd0 is 1.44M [17179619.168000] FDC 0 is a National Semiconductor PC87306 [17179619.240000] Capability LSM initialized [17179619.288000] fuse init (API version 7.6) [17179619.356000] loop: loaded (max 8 devices) [17179619.472000] Adding 289160k swap on /dev/sda2. Priority:-1 extents:1 across:289160k [17179619.732000] EXT3 FS on sda1, internal journal [17179629.656000] eth3: link up, 100Mbps, full-duplex .. Summary: On my Netfinity 5000 if the ethernet cable is connected while the if_pcn module loads, a kernel panic happens. The same driver loads fine when there is no cable connected, and then the interface can be used as expected. On a Debian based Linux distro, the same interface with the cable connected causes no trouble at all. >How-To-Repeat: Get an IBM Netfinity 5000, connect the on-board ethernet inetrface to a network switch or hub, boot the FreeBSD 6.2-RELEASE CD and see the kernel panic! >Fix: My current workaround is to make sure that whenever the if_pcn driver loads, there is no cable connected to this interface. For this reason I missed out this driver from my custom kernel, and only load the module manually once I am certain that the cable is not connected. >Release-Note: >Audit-Trail: >Unformatted: