Subject: if_wi and newer cards - I think I've found it?
To: None <port-i386@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: port-i386
Date: 12/17/2000 23:07:44
So, I decided to add a couple debugging things.  It turns out that
there is an "obvious" reason for which we can't read a MAC address.

wi_read_record is failing.  Why?  Let my debugging printf's speak for
themselves!  I added a line to try to read a serial number... this
is what I get now:

wi_read got type FCE0, expecting FD0A
wi_read got type FD0A, expecting FC01

In other words, when I'm hoping to get the SN back, I get a WI_RID_TICK_TIME.
Then, when we try to read the MAC address, we get... you guessed it, the
serial number.

My theory is that, after wi_reset, the card is cheerfully reporting on the
WI_RID_TICK_TIME as though we cared.  I'm going to experimentally change it
to do a wi_read_record, looking for WI_RID_TICK_TIME.

Ah-hah!  It now says "init failed"... and gets a valid MAC address which
looks plausible, and configures correctly.  But every time we run the
init, I get "wi0: init failed".

But I can ifconfig it.  It doesn't all work:
	wi0: xmit failed
	wi0: device timeout
	wi0: init failed
	wi0: failed to allocate 1594 bytes on NIC
	wi0: tx buffer allocation failed
	wi0: failed to allocate 1594 bytes on NIC
	wi0: mgmt. buffer allocation failed

However, my guess is that, in general, this chip is sending more feedback
to us than we like, and that's what's killing it.

Hmm.  FWIW, my Linksys card seems to be a little happier than my D-Link
with this driver.

Anyway, any feedback from people who understand this would be appreciated.
Flailing about wildly is oodles of fun, but it doesn't really fit my image
of how proper NetBSD code is developed!

-s