diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-05-28 02:35:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-05-28 02:35:49 +0000 |
commit | 9aa9ea5d34990ff1b874dcfcec0dc0f7792be2e5 (patch) | |
tree | fd3cf81193c93e3dab0f18e98cdbdc91d2bafd95 /sys/dev/cardbus | |
parent | 80e59a9582b4ee3b00346f72b79290562723a69c (diff) |
Don't use vid/pid from the CIS if vid is 0 when reporting unmatched
devices. Several devices have been known to have this behaviour.
ok deraadt@
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/cardbus.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 8c015700fd5..17fd4790ca2 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbus.c,v 1.18 2005/05/27 17:03:04 mickey Exp $ */ +/* $OpenBSD: cardbus.c,v 1.19 2005/05/28 02:35:48 jsg Exp $ */ /* $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $ */ /* @@ -588,6 +588,7 @@ cardbusprint(aux, pnp) const char *pnp; { struct cardbus_attach_args *ca = aux; + struct cardbus_matchid cm; char devinfo[256]; int i; if (pnp) { @@ -601,8 +602,14 @@ cardbusprint(aux, pnp) } if (i) printf(" "); - printf("(manufacturer 0x%x, product 0x%x)", ca->ca_cis.manufacturer, - ca->ca_cis.product); + if (ca->ca_cis.manufacturer) { + cm.cm_vid = ca->ca_cis.manufacturer; + cm.cm_pid = ca->ca_cis.product; + } else { + cm.cm_vid = CARDBUS_VENDOR(ca->ca_id); + cm.cm_pid = CARDBUS_PRODUCT(ca->ca_id); + } + printf("(manufacturer 0x%x, product 0x%x)", cm.cm_vid, cm.cm_pid); printf(" %s at %s", devinfo, pnp); } printf(" dev %d function %d", ca->ca_device, ca->ca_function); |