diff options
| author | Warner Losh <imp@FreeBSD.org> | 2005-01-20 19:59:31 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2005-01-20 19:59:31 +0000 |
| commit | e30d646d97e69f7cccace5b24b7f5c78e6777bf3 (patch) | |
| tree | ff85cab9cd53e4278aae1c2efc77eb5f1baf00bb /sys/dev/sn | |
| parent | ca33f4678a984f5673771da86bc2ee56310cab7c (diff) | |
Notes
Diffstat (limited to 'sys/dev/sn')
| -rw-r--r-- | sys/dev/sn/if_sn_pccard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 48978a04dac3..f1556c0d18f7 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccard_cis.h> #include <dev/sn/if_snvar.h> #include "card_if.h" @@ -64,6 +65,15 @@ static int sn_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, sn_pccard_products, sizeof(sn_pccard_products[0]), NULL)) != NULL) { |
