kern/112654: Kernel panic upon if_pcn module load on a Netfinity 5000

Keve Nagy (at dot dot) keve.mail.poliod.hu at FreeBSD.org
Mon May 14 13:30:03 UTC 2007


>Number:         112654
>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:30:03 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: <AMD PCnet/PCI 10/100BaseTX> port 0x2180-0x219f mem 0xfebfdc00-0xfebfdc1f irq 17 at device 9.0 on pci0
pcn0: Chip ID 2624 (Am79C972)
miibus3: <MII bus> on pcn0
ukphy0: <Generic IEEE 802.3u media interface> 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: <AMD PCnet/PCI 10/100BaseTX> port 0x2180-0x219f mem 0xfebfdc00-0xfebfdc1f irq 17 at device 9.0 on pci0
pcn0: Chip ID 2624 (Am79C972)
miibus3: <MII bus> on pcn0
ukphy0: <Generic IEEE 802.3u media interface> 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<BROADCAST,SIMPLEX,MULTICAST> 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<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	ether 00:06:29:50:d9:9e
	media: Ethernet autoselect (100baseTX <full-duplex>)
	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 at 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:


More information about the freebsd-bugs mailing list