From ae1e03e941ddd80925287313d5296162f3cc3081 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 20 Jan 2005 19:59:31 +0000 Subject: [PATCH] Only attach to network functions. I'm not aware of any multifunction (pccard sense) sn based cards, but this won't hurt. The pseudo-multifunction cards need a special driver anyway... --- sys/dev/sn/if_sn_pccard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #include +#include #include #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) {