Subject: kern/6401: de0 driver bug: ifconfig not configuring interface up?
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/05/1998 17:13:38
>Number:         6401
>Category:       kern
>Synopsis:       de0 driver bug(?): ifconfig not configuring interface up
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov  5 08:20:00 1998
>Originator:     Havard Eidnes
>Release:        NetBSD-current 19981105
System: NetBSD 1.3H NetBSD 1.3H (MAALTROST) #6: Thu Nov  5 11:18:40 MET 1998 i386

	I have an i386 machine with two ethernet cards:

de0 at pci0 dev 12 function 0
de0: interrupting at irq 5
de0: DEC DE500-XA 21140 [10-100Mb/s] pass 1.1
de0: address 00:00:f8:01:08:20
isa0 at pcib0
ep0 at isa0 port 0x300-0x30f irq 10: 3Com 3C509 Ethernet
ep0: address 00:20:af:ac:25:a0, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep0: 10baseT, 10base5/AUI, 10base2/BNC (default 10baseT)

	We only use the de0 card.

	My ifconfig.de0 file contains

		inet netmask 0xffffff80 up \
			media 100BaseTX mediaopt full-duplex

	(folded only for readability).

	During startup I get the following messages:

biomask 4240 netmask 4660 ttymask 46e2
boot device: wd0
root on wd0ade0: enabling 100baseTX port
 dumps on wd0b
root file system type: ffs
configuring network interfaces: de0de0: enabling Full Duplex 100baseTX port
add net default: gateway
adding interface aliases:
starting system logger
starting network daemons: xntpd lpd sendmailNov  5 16:02:36 maaltrost xntpd[197]: sendto( Network is down
creating runtime link editor directory cache.
starting local daemons:Nov  5 16:02:37 maaltrost xntpd[197]: sendto( Network is down
Thu Nov  5 16:02:38 MET 1998

	and when I log in on the console and run "netstat -in" I get:

maaltrost# netstat -in
Name  Mtu   Network       Address              Ipkts Ierrs    Opkts Oerrs  Coll
de0*  1500  <Link>        00:00:f8:01:08:20        0     0        1     0     0
de0*  1500  129.241.224/2          0     0        1     0     0
ep0*  1500  <Link>        00:20:af:ac:25:a0        0     0        0     0     0
lo0   32976 <Link>                                62     0       62     0     0
lo0   32976 127                62     0       62     0     0

	and I have to configure the interface up to make it work.

maaltrost# ifconfig de0 up
maaltrost# ifconfig de0
        media: Ethernet 100baseTX full-duplex
        status: active
        inet netmask 0xffffff80 broadcast

	Anyone know what's going on here?  Personally I suspect a
	device driver bug (?), hence the "kern" category above (should
	there be a category for MI device drivers?).

	The de0 port is connected to a cisco Catalyst-5000 switch, and
	the port on the switch is configured for fixed 100/fdx.

	This is with a kernel from sources SUPped today (i.e.
	yesterday's sources) and the ifconfig binary is from the 31
	Oct snapshot (and the sources do not appear to have changed
	since then).

	I should perhaps note that this only started happening after
	we yesterday turned on full-duplex both on the switch and on
	the machine.

	See above.

	As a workaround I've added a single line to ifconfig.de0
	containing the word "up", but it seems a little odd having to do

	As I'm not even entirely certain this is a device driver bug I
	have obviously not supplied a better fix.