Subject: kern/3355: if_de causes panic on media change
To: None <>
From: Matthias Scheler <>
List: netbsd-bugs
Date: 03/18/1997 21:46:29
>Number:         3355
>Category:       kern
>Synopsis:       if_de causes panic on media change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 18 13:05:01 1997
>Originator:     Matthias Scheler
Matthias Scheler                      
>Release:        970317
System: NetBSD lyssa 1.2D NetBSD 1.2D (LYSSA) #4: Tue Mar 18 21:15:25 MET 1997 tron@lyssa:/usr/src/sys/arch/i386/compile/LYSSA i386

Hoping for a fix for kern/3141 I installed a kernel with media support today.
After the reboot I checked the media type:

tron@lyssa:~>ifconfig de0
        media: autoselect status: no carrier
        inet netmask 0xfffffff8 broadcast

Although the driver had a different opinion about that the network worked
fine via the AUI/BNC port. Now I tried to change it to BNC manually
with "ifconfig de0 media bnc" and got a panic:

reboot after panic: tulip_media_poll: botch at 769

I checked the sources and found out that the panic is caused by this
"switch" statement in "tulip_media_poll":

        switch (sc->tulip_probe_state) {
            default: {
#if defined(DIAGNOSTIC)
                panic("tulip_media_poll: botch at line %d\n", __LINE__);

I tried to modify the kernel to print the contents of "sc->tulip_probe_state"
but the damned bug doesn't occur with such a modified kernel. :-(

ifconfig de0
ifconfig de0 media bnc

Sorry, I don't even know how to trace it.