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...
This commit is contained in:
parent
746ea46479
commit
ae1e03e941
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user