From 83ca21a6607ff254bcfa6b28afe8660f7629eb39 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 21 Jan 2001 08:09:00 +0000 Subject: 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. --- sys/dev/pccard/pccard.c | 9 +++++---- sys/dev/pccard/pccardvar.h | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev/pccard') diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 53aaca0..2b67922 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -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) diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index e5117cc..7e66e62 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -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, -- cgit v1.1