Subject: "ep at pcmcia" x 2 -> trouble?
To: None <port-i386@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 07/13/2002 16:53:07
I've got a laptop I wanted to put two Ethernets in. There are a number
of ep cards hanging around. So I popped two of them in.
...and promptly found there was a problem. The first one attached
(regardless of its unit number) was at "port 0x330-0x33f" and worked
fine. The second one was at 0x340-0x34f and failed the large-packet
probe ("wrote 0x7ff to TX_AVAIL_THRESH, read back 0xfcfc"). When I
diked out that code, it got further, but with a mangled MAC address
(instead of uu:vv:ww:xx:yy:zz it came out vv:vv:xx:xx:zz:zz - looking
suspiciously similar to what happened to TX_AVAIL_THRESH; printing the
value read for a "working" card shows 0x7fc).
I played with it, trying various orders, and found that it wasn't the
card and it wasn't the socket; it was always the second one, the one at
0x340-0x34f, that had trouble.
By poking around the code and easter egging, I found that (a) telling
it to allocate twice as much space doesn't work; then the first card
lands at 0x340-0x34f and fails, but that (b) allocating the same amount
of space afterwards as a dummy works: one card at 0x330-0x33f and one
at 0x350-0x35f works.
The laptop and the OS are both rather old. Has anyone tried two eps at
pcmcia and found it working with no tweaks needed? Does anyone have
any idea what might be wrong here? It's working, but I don't trust
"fixes" I don't understand. I note that -current has a comment in a
3c562-specific section (around line 300 of if_ep_pcmcia.c) and some
code that doesn't look 3c562-specific, but it looks somewhat similar to
what I saw. The boot messages don't _report_ anything with a
conflicting port allocation....
Here's how the cards are reported (I have unit numbers wired down):
ep1 at pcmcia1 function 0 port 0x330-0x33f: 3Com 3c589 10Mbps Ethernet
ep1: address 00:10:5a:fc:5c:1a, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep1: 10baseT, 10base5, 10base2 (default 10baseT)
ep0 at pcmcia0 function 0 port 0x350-0x35f: 3Com 3c589 10Mbps Ethernet
ep0: address 00:10:5a:fc:5e:a0, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep0: 10baseT, 10base5, 10base2 (default 10baseT)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B