diff options
author | imp <imp@FreeBSD.org> | 2002-07-22 21:24:12 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-07-22 21:24:12 +0000 |
commit | f1d60c06e8eb7cb8fd34c17e3dc8d4591284e8c9 (patch) | |
tree | 5f961c032f075a6b9f97a08b740024cf22039ee1 /sys | |
parent | e123a791c5a8613be6eefeb018ca0bb6f3239a11 (diff) | |
download | FreeBSD-src-f1d60c06e8eb7cb8fd34c17e3dc8d4591284e8c9.zip FreeBSD-src-f1d60c06e8eb7cb8fd34c17e3dc8d4591284e8c9.tar.gz |
Three minor changes:
1) Add support for compaq cpq 10/100 card (a rebadged ce3)
2) Minor protection for failure on vendor lookup
3) Minor style(9) nits.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/xe/if_xe_pccard.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index c45a63f..e86ee32 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -213,6 +213,8 @@ xe_pccard_probe(device_t dev) */ pccard_get_vendor(dev, &vendor); vendor_itm = xe_vendor_lookup(vendor, &xe_vendor_devs[0]); + if (vendor_itm == NULL) + return (ENODEV); scp->vendor = vendor_itm->vendor_desc; pccard_get_product(dev, &prodid); pccard_get_prodext(dev, &prodext); @@ -222,21 +224,19 @@ xe_pccard_probe(device_t dev) */ prod = (prodid << 8) | prodext; card_itm = xe_card_type_lookup(prod, &xe_card_type_devs[0]); - if(!card_itm) + if (card_itm == NULL) return (ENODEV); - else { - scp->card_type = card_itm->card_type_desc; - if (card_itm->prod_type & XE_PROD_MODEM_UMASK) - scp->modem = 1; - for(i=1; i!=XE_CARD_TYPE_FLAGS_DINGO; i=i<<1) { - switch(i & card_itm->flags) { - case XE_CARD_TYPE_FLAGS_CE2: - scp->ce2 = 1; break; - case XE_CARD_TYPE_FLAGS_MOHAWK: - scp->mohawk = 1; break; - case XE_CARD_TYPE_FLAGS_DINGO: - scp->dingo = 1; break; - } + scp->card_type = card_itm->card_type_desc; + if (card_itm->prod_type & XE_PROD_MODEM_UMASK) + scp->modem = 1; + for(i=1; i!=XE_CARD_TYPE_FLAGS_DINGO; i=i<<1) { + switch(i & card_itm->flags) { + case XE_CARD_TYPE_FLAGS_CE2: + scp->ce2 = 1; break; + case XE_CARD_TYPE_FLAGS_MOHAWK: + scp->mohawk = 1; break; + case XE_CARD_TYPE_FLAGS_DINGO: + scp->dingo = 1; break; } } /* @@ -307,6 +307,7 @@ xe_pccard_detach(device_t dev) } static const struct pccard_product xe_pccard_products[] = { + PCMCIA_CARD(COMPAQ2, CPQ_10_100, 0), PCMCIA_CARD(XIRCOM, CE, 0), PCMCIA_CARD(XIRCOM, CE2, 0), PCMCIA_CARD(XIRCOM, CE3, 0), |