From 32ae3855b3996bf8e6de71a042760207841f95f0 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 20 Jan 2005 20:08:18 +0000 Subject: [PATCH] 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). --- sys/dev/fe/if_fe_pccard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c index 187bb3dee9f..fc495d49dff 100644 --- a/sys/dev/fe/if_fe_pccard.c +++ b/sys/dev/fe/if_fe_pccard.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #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, -- 2.45.2