Subject: Bay PCMCIA ne2000 and MII
To: None <tech-kern@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: tech-kern
Date: 02/06/2004 12:06:01
Hi,

I acquired BayStack 22 PCMCIA card at bargain price years ago, and
am successfully using it with a minor modification in if_ne_pcmcia.c.
My Q is the card emits two MII probing message and I can not figure
out whether it's normal or not;

pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: Nortel, BAYSTACK22-PCMCIA-ETHERNET, V1, 0
pcmcia0: Manufacturer code 0x1bf, product 0x202
pcmcia0: function 0: network adapter, ccr addr 3c0 mask 63
pcmcia0: function 0, config table entry 7: I/O card; irq mask ffff; iomask a, iospace
300-31f; mwait_required io16 irqlevel
ne0 at pcmcia0 function 0 port 0x300-0x30f port 0x310-0x31f
ne0: Nortel BayStack22 (AX88190) Ethernet
ne0: Ethernet address 00:80:2d:90:17:e0
ukphy0 at ne0 phy 0: Generic IEEE 802.3u media interface
ukphy0: OUI 0x0006b8, model 0x000c, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ukphy1 at ne0 phy 16: Generic IEEE 802.3u media interface
ukphy1: OUI 0x0006b8, model 0x000c, rev. 1
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcmcia0: card irq 5

It works sometimes flakely in particular when media selection is set autosense and
a network cable is re-plugged.  /sbin/ifconfig operation with explicit media indication
cures it.  It's acceptable in field use but I wonder there is a solution around MII.

All what I did in if_ne_pcmcia.c is as follows;

$ diff -c if_ne_pcmcia.c.orig if_ne_pcmcia.c
*** if_ne_pcmcia.c.orig Thu Sep 19 04:37:21 2002
--- if_ne_pcmcia.c      Mon Nov  3 17:16:34 2003
***************
*** 462,467 ****
--- 462,471 ----
        PCMCIA_CIS_NETGEAR_FA411,
        0, -1, { 0x00, 0x40, 0xf4 } },

+     { "Nortel BayStack22",
+       0x01bf, 0x0202,
+       { "Nortel", "BAYSTACK22-PCMCIA-ETHERNET", NULL, NULL },
+       0, -1, { 0x00, 0x80, 0x2d }, NE2000DVF_AX88190 },
  #if 0
      /* the rest of these are stolen from the linux pcnet pcmcia device
         driver.  Since I don't know the manfid or cis info strings for

Does anyone out there have me any clue about what's going in that ne2000-compatible?

Toru Nishimura/ALKYL Technology