Convert the vendor/product cis strings to an array of CIS entries. This
allows us to use the PCCARD_CIS #defines generated to distinguish cards that don't have a Manufacturer and OEM.
This commit is contained in:
parent
e04645ca26
commit
25d55c6636
@ -262,12 +262,13 @@ pccard_product_lookup(device_t dev, const struct pccard_product *tab,
|
||||
matches = 0;
|
||||
if (matches && fcn != ent->pp_expfunc)
|
||||
matches = 0;
|
||||
if (matches && ent->pp_vendor_str &&
|
||||
strcmp(ent->pp_vendor_str, vendorstr) != 0)
|
||||
if (matches && ent->pp_cis[0] &&
|
||||
strcmp(ent->pp_cis[0], vendorstr) != 0)
|
||||
matches = 0;
|
||||
if (matches && ent->pp_product_str &&
|
||||
strcmp(ent->pp_product_str, prodstr) != 0)
|
||||
if (matches && ent->pp_cis[1] &&
|
||||
strcmp(ent->pp_cis[1], prodstr) != 0)
|
||||
matches = 0;
|
||||
/* XXX need to match cis[2] and cis[3] also XXX */
|
||||
if (matchfn != NULL)
|
||||
matches = (*matchfn)(dev, ent, matches);
|
||||
if (matches)
|
||||
|
@ -214,8 +214,7 @@ struct pccard_product {
|
||||
#define PCCARD_PRODUCT_ANY ((u_int32_t) -1)
|
||||
u_int32_t pp_product;
|
||||
int pp_expfunc;
|
||||
const char *pp_vendor_str; /* NULL to not match */
|
||||
const char *pp_product_str; /* NULL to not match */
|
||||
const char *pp_cis[4];
|
||||
};
|
||||
|
||||
typedef int (*pccard_product_match_fn) (device_t dev,
|
||||
|
Loading…
Reference in New Issue
Block a user