Subject: Kingmax KEN0100-AF
To: None <>
From: Patrick Welche <>
List: tech-kern
Date: 01/19/2002 20:03:03

   965          if ((last_liobase == psc->sc_pcioh.addr)
   966              || (last_liobase != new_liobase))

from if_ne_pcmcia.c,v 1.85 allows a Kingmax KEN0100-AF ethernet card to

pcmcia0: CIS version unknown (major=1, minor=0)
pcmcia0: CIS info: PCMCIA, 10/100 Ethernet Card, , 
pcmcia0: Manufacturer code 0x8a01, product 0xc1ab
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
ne0: LAN iobase 0x300 (0x4300) -> 0x300
ne0: Melco LPC3-TX (AX88190) Ethernet
ne0: Ethernet address 00:a0:0c:46:c1:79
ukphy0 at ne0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x0008bb, model 0x0002, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

What did that check do?

It fails because
               last_liobase   psc->sc_pcioh.addr   new_liobase
ne0: LAN iobase   0x300          (0x4300)       ->    0x300

Now for a lesson please - it's my first time in these files..

According to ken-100a_oem.h from

Kingmax GENERIC_KEN0100A 10/100 Ethernet PC Card
Kingmax GENERIC_KEN0100B 10/100 Ethernet PC Card
Legend-easy 10/100M Ethernet PC Card

all have the same (vendor,product) id. (For that matter according to our
pcmciadevs, Compex, Melco and Zonet all have the same vendor id.) We already
had support for the Melco, which is why the Kingmax "just worked". The bit
that bothers me is that if that card where a NE2000DVF_DL10019 rather than a
NE2000DVF_AX88190, the enaddr[0-2] would have been read off the card and
compared with the vendor's OUI. Obviously the Kingmax card above has
00:a0:0c which is Kingmax. According to the ne2000devs entry for Melco:

   261      { PCMCIA_STR_MELCO_LPC2_TX,
   263        PCMCIA_CIS_MELCO_LPC2_TX,
   264        0, -1, { 0x00, 0x40, 0x26 }, NE2000DVF_DL10019 },

Melco's OUI is 00:40:26. If that check were enforced the Kingmax would still
not match.

The syntax in pcmciadevs seems to be

product VENDORIDDEF PRODUCTDEF productid comment



and accordingly the ne2000_match macro just checks productid or cisinfo => I
don't see a way of being able to differentiate between the Melco and the
Kingmax. It isn't necessary to do so, but if that OUI check were enforced, it
would be. Have I missed something?


(telneting with the Kingmax)