aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-01-17 06:54:48 +0000
committerWarner Losh <imp@FreeBSD.org>2005-01-17 06:54:48 +0000
commitddd8ec50b04e7c3147995051e20c52db56f225e1 (patch)
tree130d8d1ac589fe59ebb73913a76f16700a22bac4
parent5e93f2e558191b13751deaa0ba98a6d9b2e278e5 (diff)
Notes
-rw-r--r--sys/dev/pccard/pccard.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 020f89494f12..0b5ce6196990 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -340,6 +340,8 @@ pccard_do_product_lookup(device_t bus, device_t dev,
u_int32_t prod;
const char *vendorstr;
const char *prodstr;
+ const char *cis3str;
+ const char *cis4str;
#ifdef DIAGNOSTIC
if (sizeof *ent > ent_size)
@@ -356,6 +358,10 @@ pccard_do_product_lookup(device_t bus, device_t dev,
return (NULL);
if (pccard_get_product_str(dev, &prodstr))
return (NULL);
+ if (pccard_get_cis3_str(dev, &cis3str))
+ return (NULL);
+ if (pccard_get_cis4_str(dev, &cis4str))
+ return (NULL);
for (ent = tab; ent->pp_vendor != 0; ent =
(const struct pccard_product *) ((const char *) ent + ent_size)) {
matches = 1;
@@ -385,7 +391,14 @@ pccard_do_product_lookup(device_t bus, device_t dev,
(prodstr == NULL ||
strcmp(ent->pp_cis[1], prodstr) != 0))
matches = 0;
- /* XXX need to match cis[2] and cis[3] also XXX */
+ if (matches && ent->pp_cis[2] &&
+ (cis3str == NULL ||
+ strcmp(ent->pp_cis[2], cis3str) != 0))
+ matches = 0;
+ if (matches && ent->pp_cis[3] &&
+ (cis4str == NULL ||
+ strcmp(ent->pp_cis[3], cis4str) != 0))
+ matches = 0;
if (matchfn != NULL)
matches = (*matchfn)(dev, ent, matches);
if (matches)