diff options
author | imp <imp@FreeBSD.org> | 2005-01-20 19:37:22 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-01-20 19:37:22 +0000 |
commit | 3afb2ac5309053fcf72759aacfa54654aed0323b (patch) | |
tree | fa9ac369213bd9ef949c22a8b423b23ab4c1222a /sys/dev/ed | |
parent | d7a3cd480757476d9b68913a296da7e21162ff12 (diff) | |
download | FreeBSD-src-3afb2ac5309053fcf72759aacfa54654aed0323b.zip FreeBSD-src-3afb2ac5309053fcf72759aacfa54654aed0323b.tar.gz |
Only attach to network functions.
Diffstat (limited to 'sys/dev/ed')
-rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index b9f75e7..6711df9 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -51,6 +51,7 @@ #include <dev/ed/if_edreg.h> #include <dev/ed/if_edvar.h> #include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccard_cis.h> #ifndef ED_NO_MIIBUS #include <dev/mii/mii.h> #include <dev/mii/miivar.h> @@ -192,6 +193,15 @@ static int ed_pccard_match(device_t dev) { const struct ed_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 = (const struct ed_product *) pccard_product_lookup(dev, (const struct pccard_product *) ed_pccard_products, |