Subject: A PCMCIA ne(4) ethernet device.
To: None <netbsd-help@netbsd.org>
From: Richard Rauch <rkr@olib.org>
List: netbsd-help
Date: 05/28/2004 23:50:14
I thought that this would be the best place to ask.

The NetBSD version numbers, below, are from memory.  Don't
take them *too* literally.  (^&

A couple of years ago, I picked up a laptop and added a PCMCIA
ethernet card.  That was, I believe, under 1.5.  It worked, though
I recall that it would alternate on warm-boots between ne1 (unusable)
and ne2 (usable) unless I nailed it down to ne0 with a kernel config
line.  Under 1.6, it stopped working; the kernel would not recognize
it anymore.  Because it had worked in 1.5, I took a low-tech solution
to finding out where it got derailed.  I added printf() statements
to the ...src/sys/dev/pcmcia/if_ne_pcmcia.c file to see where it
happened and whether I could fix it.

The failure occurred at what was then the very last line of code
before the closing brace in last function of that file.  It
seemed that there was a test being performed and my card did not
pass the test.  I didn't know exactly what the purpose of the test
was, but figured it was worth seeing if the test was all that
essential.  I either reversed the sense of the test, or just
forced it to always succeed (I forget which).

My card started working again.

I have not noticed any particular problems with the card.
Certainly none that would make me say, "I wish that the kernel
didn't recognize this card."  I recall some problems with
sustained 100Mbps, but someone said that PCMCIA just can't
move data that fast, so I locked it to 10Mbps, and haven't
had any problems since.  (I can't remember if the problems at
100Mbps were just kernel messages or if it lost TCP packets
and had to resync.)

The problem has remained at least up through pre-2.0 -current.
It is on my mind again because I recently cleaned out the
source tree and re-populated it from raw NetBSD sources---and
I forgot to save my hacked if_ne_pcmcia.c.


I filed a PR on it, but wasn't sure how to handle a card-specific
quirk like that (I am still not sure).  I've just kept a private
hack in my copy of the sources.  However, a stock GENERIC or
GENERIC_LAPTOP will not work to get onto my network because
of this problem.  I am in the fortunate position where I can
easily supply myself a kernel that will talk to my card, but
even for me it's a bother---mostly because the easiest way to
get a new kernel is from my network...(^&  And for a first-time
user who might be in my situation, it might just turn them away.

So, my questions:

 * Is there any interest in having this fixed in NetBSD proper,
   or should it just remain a personal hack?

 * Other than the old PR that I filed <whenever>, is there
   anything more that I can do?


The dmesg lines for the card are:

ne0 at pcmcia0 function 0
ne0: LAN iobase 0x300 (0x4300) -> 0x300
ne0: Melco LPC3-TX (AX88190) Ethernet
ne0: Ethernet address 00:02:dd:77:2b:1d


Thanks in advance.


-- 
  "I probably don't know what I'm talking about."  http://www.olib.org/~rkr/