summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-01-20 20:08:18 +0000
committerimp <imp@FreeBSD.org>2005-01-20 20:08:18 +0000
commit32ae3855b3996bf8e6de71a042760207841f95f0 (patch)
treee06c3596bee91a1153c9da78c3a347224110715f /sys
parentada7b5238262289220dce1cb98a6f6f79e366706 (diff)
downloadFreeBSD-src-32ae3855b3996bf8e6de71a042760207841f95f0.zip
FreeBSD-src-32ae3855b3996bf8e6de71a042760207841f95f0.tar.gz
Only attach to network functions. This should be a nop since I'm not
aware of any fe based cards that do anything except network (well, maybe the fujitsu scsi/lan card, but I've only seen two of those on ebay in the last 3 years).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fe/if_fe_pccard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c
index 187bb3d..fc495d4 100644
--- a/sys/dev/fe/if_fe_pccard.c
+++ b/sys/dev/fe/if_fe_pccard.c
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
#include <dev/fe/if_fevar.h>
#include <dev/pccard/pccardvar.h>
+#include <dev/pccard/pccard_cis.h>
#include "card_if.h"
#include "pccarddevs.h"
@@ -89,6 +90,15 @@ static int
fe_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,
(const struct pccard_product *)fe_pccard_products,
OpenPOWER on IntegriCloud