Subject: kern/5673: we0 and 16bit mode
To: None <>
From: Matthias Pfaller <>
List: netbsd-bugs
Date: 06/28/1998 19:37:14
>Number:         5673
>Category:       kern
>Synopsis:       wd8003 clones with 16bit support won't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 28 13:05:01 1998
>Originator:     Matthias Pfaller
Matthias Pfaller                            Software Entwicklung
marco Systemanalyse und Entwicklung GmbH    Tel   +49 8131 5161-41
Hans-Böckler-Str. 2, D 85221 Dachau         Fax   +49 8131 5161-66                        Email
>Release:        250698
System: NetBSD styx 1.3F NetBSD 1.3F (STYX) #1: Sun Jun 28 15:06:45 CEST 1998     root@styx:/usr/src/sys/arch/i386/compile/STYX i386

	Today I tried to upgrade my X-Terminal from NetBSD-1.2G to 1.3F.
	The network interface in the machine is a "Compex ENET16/V" ISA
	board. I'm using the board in the WDP mode in which it should
	be compatible to the EtharCard Plus 16. But the card seems to
	identify itself as a WD8003EP. So I forced the use of 16bit mode
	by using the following config line:

		we0	at isa? port 0x280 iomem 0xd0000 iosiz 0x4000 irq 9 flags 4

	With 1.2G and the ed driver this worked without problems. With
	1.3F and the we driver this does not work.
	Try to use a "Compex ENET16/V" in 16bit mode.
	if_we.c switches the adapter into 16bit mode only when it is
	identified as a WD8013. The following patch works for me, but
	I'm not sure if this right way to doit.
--- if_we.c.ORIG	Mon Jun  1 22:35:17 1998
+++ if_we.c	Sun Jun 28 14:52:47 1998
@@ -424,6 +424,7 @@
 	    (wsc->sc_type == WE_TYPE_TOSHIBA1) ||
 	    (wsc->sc_type == WE_TYPE_TOSHIBA4) ||
+	    (wsc->sc_16bitp) ||
 	    (wsc->sc_type == WE_TYPE_WD8013EBT)) {
 		wsc->sc_laar_proto = (ia->ia_maddr >> 19) & WE_LAAR_ADDRHI;
 		if (wsc->sc_16bitp)