Subject: Problems with ed Ethernet driver
To: None <netbsd-help@NetBSD.ORG>
From: Scott Mitchell <rsm1@borg.cs.waikato.ac.nz>
List: netbsd-help
Date: 04/17/1995 14:01:04
Hi all,

After finally getting NetBSD-1.0 to boot off my big 2nd IDE drive, I'm now
having some really wierd problems with Ethernet. Why wierd? Read on and
find out....

The machine is a DECpc LPx+ DX4/100. Two IDE disks: wd0 is a 257 Meg
Western Digital with DOS/Windows on it, wd1 is a 520 Meg Seagate with
NetBSD-1.0 installed. The Ethernet card is a SMC/WD 8013EPC, configured as
ed0 in the generic kernel I am using.

The card works perfectly under DOS and Windows, and when NetBSD is booted
off the installation floppy. I installed BSD via FTP using this card, so I
_know_ it works.

However, when I boot off wd1, into single- or multi-user, as soon as I
ifconfig ed0 I get

	ed0: NIC memory corrupt - invalid packet length 0

continuously and forever more...until I reboot. Nothing that tries to use
the Ethernet will work. Here's what happens in a bit more detail:

>NetBSD 1.0 (GENERICAHA) #3: Sun Oct 23 20:58:04 PDT 1994
>    cgd@sun-lamp.cs.berkeley.edu:/usr/src/sys/arch/i386/
>    compile/GENERICAHA
>CPU: i486DX (GenuineIntel 486-class CPU)
>real mem  = 7995392
>avail mem = 6533120
>using 123 buffers containing 503808 bytes of memory
>pc0 at isa0 port 0x60-0x6f irq 1: color
>com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
>com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
>lpt0 at isa0 port 0x378-0x37f irq 7
>wdc0 at isa0 port 0x1f0-0x1f7 irq 14
>wd0 at wdc0 drive 0: 257MB 917 cyl, 12 head, 48 sec <WDC AC1270F>
>wd1 at wdc0 drive 1: 520MB 1057 cyl, 16 head, 63 sec <ST3660A>
>fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
>fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
>ed0 at isa0 port 0x280-0x29f iomem 0xd0000-0xd1fff irq 9: address
>    00:00:c0:1f:5e:12, type WD8003E (8-bit) 
>ie0: unknown AT&T board type code 15
>npx0 at isa0 port 0xf0-0xff: using exception 16
>biomask 4040 netmask 21a ttymask 1a
>changing root device to wd1a

If multi-user, the boot sequence proceeds normally from here on in (I don't
have the interface configured by netstart right now). Once I'm logged in as
root:

># ifconfig ed0 130.217.244.33

and then (once on the console, with plenty more in /var/log/messages)

>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0
>ed0: NIC memory corrupt - invalid packet length 0

and so on. I've tried:
- booting single-user from wd1 and running ifconfig. Same result.
- using a different card setup (ed2 in the generic kernel). Same result.
- using a different card (a WD8003EBT). This card also works flawlessly
  under DOS/Win, and from a floppy NetBSD boot. The same thing happens
  after a wd1 boot though.

After all the troubles I had getting things running off the second IDE
drive, I might try swapping my disks over and booting off wd0, but this
involves dismantling most of the machine so it's a last resort, and a long
shot at that. Otherwise, I'm all out of ideas. I've looked at the source
for the ed driver and it seems the card's internal structures need to get
pretty tangled for this message to appear. I'm convinced that the hardware
is OK, and the thing works in all other situations, so what's going on?

All advice will be gratefully received :)

Cheers,
	Scott

+----------------------------------------------------------------------------+
| Scott Mitchell, Computer Science Dept, University of Waikato, Hamilton, NZ |
| email: rsm1@cs.waikato.ac.nz       WWW: http://www.cs.waikato.ac.nz/~rsm1/ |
| phone: +64 (7) 856-2889 ext6026    fax: +64 (7) 838-4155                   |
+----------------------------------------------------------------------------+