Subject: wi0 hassles on Dell 5000e.
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 01/17/2001 12:17:32
Hi folks,

Luke Mewburn and I have been having hassles getting a WaveLan card to
work in a Dell Inspiron 5000e.  Inserting a WaveLan card results in:

	wi0: init failed
	wi0: timeout in wi_seek to fce0/0; last status ffff
	wi0: could not get mac address, attach failed

It did work however if a cardbus ethernet card was already inserted
before inserting the WaveLan.  Enabling all the cardbus-type DEBUG
options led to discovering that when the card worked its IO ports were
mapped at 0x2100:

	pccbb_pcmcia_do_io_map win 0 addr 0x2100 size 0x40 width 16

and when it failed they were mapped at 0x2400:

	pccbb_pcmcia_do_io_map win 0 addr 0x2400 size 0x40 width 16

So, with the following extremely grotty hack:

Index: rbus.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/cardbus/rbus.c,v
retrieving revision 1.8
diff -d -p -u -r1.8 rbus.c
--- rbus.c	2000/05/30 09:18:06	1.8
+++ rbus.c	2001/01/17 01:01:52
@@ -152,6 +152,8 @@ rbus_space_alloc_subregion(rbt, substart
 				    align, 0, exflags, (u_long *)&result);
 				DPRINTF(("rbus: trying [%lx:%lx] %lx\n",
 				    search_addr, search_addr + size, align));
+if (search_addr == 0x2000)	/* XXX snark XXX */
+ search_addr -= 0x300;		/* XXX snark XXX */
 				if (val == 0) {
 					break;
 				}

I can wire in 0x2100 and now use the WaveLan (well, I think I can -
I can ifconfig it but as yet haven't got anything else to talking
to it with).  This also hasn't affected the usage of a Xircom combo
10/100/modem card.

Anyone got any ideas on what is actually wrong (why it doesn't work
at a different IO address) and how to fix it properly?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/