diff options
author | imp <imp@FreeBSD.org> | 2005-01-20 19:56:22 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-01-20 19:56:22 +0000 |
commit | 746ea46479e46eaa07e7385c7495b5574bd70ad5 (patch) | |
tree | 254975606153fa8c88336987eee8faa389d29196 | |
parent | 6193b800a7f300567ec09c58a90a968508d8fc37 (diff) | |
download | FreeBSD-src-746ea46479e46eaa07e7385c7495b5574bd70ad5.zip FreeBSD-src-746ea46479e46eaa07e7385c7495b5574bd70ad5.tar.gz |
Only attach to network functions (unlikely to matter since I'm not
aware of any multi-function cs cards, but it doesn't hurt).
-rw-r--r-- | sys/dev/cs/if_cs_pccard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c index dbd3e54..c7b3eca5 100644 --- a/sys/dev/cs/if_cs_pccard.c +++ b/sys/dev/cs/if_cs_pccard.c @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include <dev/cs/if_csvar.h> #include <dev/cs/if_csreg.h> #include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccard_cis.h> #include "card_if.h" #include "pccarddevs.h" @@ -57,6 +58,15 @@ static int cs_pccard_match(device_t dev) { const struct pccard_product *pp; + int error; + uint32_t fcn = PCCARD_FUNCTION_UNSPEC; + + /* Make sure we're a network function */ + error = pccard_get_function(dev, &fcn); + if (error != 0) + return (error); + if (fcn != PCCARD_FUNCTION_NETWORK) + return (ENXIO); if ((pp = pccard_product_lookup(dev, cs_pccard_products, sizeof(cs_pccard_products[0]), NULL)) != NULL) { |