Only attach to network functions (unlikely to matter since I'm not
aware of any multi-function cs cards, but it doesn't hurt).
This commit is contained in:
parent
a20e4848bd
commit
ca33f4678a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140524
@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/cs/if_csvar.h>
|
||||
#include <dev/cs/if_csreg.h>
|
||||
#include <dev/pccard/pccardvar.h>
|
||||
#include <dev/pccard/pccard_cis.h>
|
||||
|
||||
#include "card_if.h"
|
||||
#include "pccarddevs.h"
|
||||
@ -57,6 +58,15 @@ static int
|
||||
cs_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, cs_pccard_products,
|
||||
sizeof(cs_pccard_products[0]), NULL)) != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user