Subject: Re: port-i386/10139: cnw(4) does not work any more
To: None <itojun@itojun.org>
From: Michael Eriksson <eramore@era-t.ericsson.se>
List: netbsd-bugs
Date: 06/17/2000 16:48:42
itojun@itojun.org wrote:
> 	"cnw" driver (xircom netwave airsurfer pcmcia card) does not work
> 	any more.
> 	The card is probed with wrong random MAC address.  actual mac address
> 	on the card is 00:20:d8:00:6f:28.  there seem to be some timing/delay
> 	involved with instability of MAC address setting.

I've found the problem. Apparently, the netwave only decodes 10 I/O
address bits. Version 1.21 of dev/isa/i82365_isasubr.c moved the I/O
window from 0x330..0x3ff to 0x400..0xfff, which the netwave can't
handle.

Below is the patch I use, but I guess the ISA I/O space is a complex
matter...

Index: i82365_isasubr.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/isa/i82365_isasubr.c,v
retrieving revision 1.21
diff -u -r1.21 i82365_isasubr.c
--- i82365_isasubr.c	2000/05/09 17:59:39	1.21
+++ i82365_isasubr.c	2000/06/17 13:23:17
@@ -390,9 +390,15 @@
 	bus_addr_t base;
 	u_int32_t length;
 {
+	int iobuswidth;
+#ifndef PCIC_NARROW_ISA
 	bus_space_handle_t ioh_high;
-	int i, iobuswidth, tmp1, tmp2;
+	int i, tmp1, tmp2;
+#endif
 
+#ifdef PCIC_NARROW_ISA
+	iobuswidth = 10;
+#else	
 	/*
 	 * figure out how wide the isa bus is.  Do this by checking if the
 	 * pcic controller is mirrored 0x400 above where we expect it to be.
@@ -427,6 +433,7 @@
 	}
 
 	bus_space_free(iot, ioh_high, length);
+#endif
 
 	/*
 	 * XXX some hardware doesn't seem to grok addresses in 0x400 range--

-- 
Michael Eriksson <eramore@era-t.ericsson.se>
NO CARRIER