Subject: Re: Bug: kern/18359
To: None <tech-kern@netbsd.org>
From: Richard Rauch <rauch@rice.edu>
List: tech-kern
Date: 10/12/2002 01:18:06
On Thu, 10 Oct 2002, Richard Rauch wrote:

> Over the coming weekend, I may have time to fiddle with getting 1.6 to
> work with my laptop's ethernet card.  (1.5 worked with a customized kernel
> config; 1.6 identifies the card but then gives up and says it can't match
> the vender code.  See kern/18359 for more details.)

I put a little time into it, now.

It appears to fail in ne_pcmcia_ax88190_set_iobase(psc), from the
if_ne_pcmcia.c file (called from ne_pcmcia_attach(), as well as from
ne_pcmcia_enable().  After glancing through
ne_pcmcia_av88190_set_iobase(), it appeared that everything worked with my
card UP TO the very last check, where for my card the check failed and
{rv} was never cleared to 0.

So, I made that {rv = 0;} statement (the second to last thing before
either of the fail: labels) unconditional.  Now, my PCMCIA MELCO ne0
ethernet card works with NetBSD 1.6 (slightly hacked).

I do not know why the code does the check; I haven't yet determined if the
check fails on the == relation or on the != check in that final if().  I
know only that, at least for my card, it appears that the final check
prior to setting {rv} is superfluous (and fatally wrong).


I'll switch my laptop over to this pseudo-1.6 kernel for a few days, and
if all goes well (and no one tells me why I really want that {rv = 0;}
line to fail in 1.6 without comparable lossage in 1.5.x), maybe I may even
get my laptop upgraded to ~1.6 this weekend.  (^&

(If anyone feels like looking, it's less than a dozen lines from the
bottom of /usr/src/sys/dev/pcmcia/if_ne_pcmcia.c.  Similarly, if anyone is
using an AX88190 type PCMCIA ethernet card and can conform that 1.6 *does*
work for them (so the check isn't simply reversed/breaking-the-driver), it
might be nice to hear.  (^&  I don't know anything about the hardware, or
really the framework in which the driver lays, so I don't know if my hack
would help/hurt others.  But, it appears absolutely essential to using
this card in this laptop.)


If I want to attach a workaround-patch to my PR, how do I do that?  (The
last time I followed someone's advice and got a slightly-nastygram from
someone about not following proper procedure.  Can I just reply to the
message that GNATS sent me for the PR?)


Thanks in advance.


  ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu