diff options
author | imp <imp@FreeBSD.org> | 2004-06-27 13:25:28 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-06-27 13:25:28 +0000 |
commit | 9739f5e620632bbd9f7ea381b97cbfd20dca2fdc (patch) | |
tree | 30db5a00b3066ab266d4d0e6a6dd86cc8643a756 /sys/dev/xe | |
parent | 00b6a4b2accf45b5e0274197a7985752463115d4 (diff) | |
download | FreeBSD-src-9739f5e620632bbd9f7ea381b97cbfd20dca2fdc.zip FreeBSD-src-9739f5e620632bbd9f7ea381b97cbfd20dca2fdc.tar.gz |
MFp4:
Add Intel Pro100Lan56 card.
Also integrate changes from Carlos Velasco. Only attch if we're a
network device (to filter out the serial devices). Also, increment
vpmatch if we match to conform to the pccard match function api.
Diffstat (limited to 'sys/dev/xe')
-rw-r--r-- | sys/dev/xe/if_xe_pccard.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index 9dc7cbc..af014b9 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -106,6 +106,7 @@ static const struct xe_pccard_product xe_pccard_products[] = { { PCMCIA_CARD_D(ACCTON, EN2226, 0), 0x43, XE_CARD_TYPE_FLAGS_MOHAWK }, { PCMCIA_CARD_D(COMPAQ2, CPQ_10_100, 0), 0x43, XE_CARD_TYPE_FLAGS_MOHAWK }, { PCMCIA_CARD_D(INTEL, EEPRO100, 0), 0x43, XE_CARD_TYPE_FLAGS_MOHAWK }, + { PCMCIA_CARD_D(INTEL, PRO100LAN56, 0), 0x46, XE_CARD_TYPE_FLAGS_DINGO }, { PCMCIA_CARD_D(XIRCOM, CE, 0), 0x41, XE_CARD_TYPE_FLAGS_NO }, { PCMCIA_CARD_D(XIRCOM, CE2, 0), 0x41, XE_CARD_TYPE_FLAGS_CE2 }, { PCMCIA_CARD_D(XIRCOM, CE2, 0), 0x42, XE_CARD_TYPE_FLAGS_CE2 }, @@ -409,6 +410,8 @@ xe_pccard_product_match(device_t dev, const struct pccard_product* ent, int vpfm if (xpp->prodext != prodext) vpfmatch = 0; + else + vpfmatch++; return (vpfmatch); } @@ -416,12 +419,21 @@ xe_pccard_product_match(device_t dev, const struct pccard_product* ent, int vpfm static int xe_pccard_match(device_t dev) { + int error = 0; + u_int32_t fcn = PCCARD_FUNCTION_UNSPEC; const struct pccard_product *pp; DEVPRINTF(2, (dev, "pccard_match\n")); - pp = (const struct pccard_product*)xe_pccard_products; + /* Make sure we're a network driver */ + error = pccard_get_function(dev, &fcn); + if (error != 0) + return (error); + if (fcn != PCCARD_FUNCTION_NETWORK) + return (ENXIO); + /* If we match something in the table, it is our device. */ + pp = (const struct pccard_product *)xe_pccard_products; if ((pp = pccard_product_lookup(dev, pp, sizeof(xe_pccard_products[0]), xe_pccard_product_match)) != NULL) return (0); |