1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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:
Warner Losh 2001-01-21 08:09:00 +00:00
parent 654c30a008
commit da15fcf11c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71322
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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,