summaryrefslogtreecommitdiffstats
path: root/sys/dev/sn
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-01-20 19:59:31 +0000
committerimp <imp@FreeBSD.org>2005-01-20 19:59:31 +0000
commitae1e03e941ddd80925287313d5296162f3cc3081 (patch)
treeff85cab9cd53e4278aae1c2efc77eb5f1baf00bb /sys/dev/sn
parent746ea46479e46eaa07e7385c7495b5574bd70ad5 (diff)
downloadFreeBSD-src-ae1e03e941ddd80925287313d5296162f3cc3081.zip
FreeBSD-src-ae1e03e941ddd80925287313d5296162f3cc3081.tar.gz
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...
Diffstat (limited to 'sys/dev/sn')
-rw-r--r--sys/dev/sn/if_sn_pccard.c10
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 48978a04..f1556c0 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) {
OpenPOWER on IntegriCloud