summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2019-07-10 08:16:11 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2019-07-10 08:16:11 +0000
commit919b2a928e5b64b6c5d08eebb0e3cd29f3cae503 (patch)
tree22f38cc5001fad735c5e5dce294512c61a120fe1 /sys/dev/usb
parent42ec39133698244394b990b02c9735c3fb824e1e (diff)
Also dump interface association descriptor when debugging is
compiled in. ok jan@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uvideo.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index 0c382b39071..482c84ad539 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.199 2018/05/01 18:14:46 landry Exp $ */
+/* $OpenBSD: uvideo.c,v 1.200 2019/07/10 08:16:10 patrick Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -198,6 +198,8 @@ void uvideo_dump_desc_output(struct uvideo_softc *,
const usb_descriptor_t *);
void uvideo_dump_desc_endpoint(struct uvideo_softc *,
const usb_descriptor_t *);
+void uvideo_dump_desc_iface_assoc(struct uvideo_softc *,
+ const usb_descriptor_t *);
void uvideo_dump_desc_interface(struct uvideo_softc *,
const usb_descriptor_t *);
void uvideo_dump_desc_config(struct uvideo_softc *,
@@ -2381,6 +2383,11 @@ uvideo_dump_desc_all(struct uvideo_softc *sc)
printf("|\n");
uvideo_dump_desc_interface(sc, desc);
break;
+ case UDESC_IFACE_ASSOC:
+ printf(" (UDESC_IFACE_ASSOC)\n");
+ printf("|\n");
+ uvideo_dump_desc_iface_assoc(sc, desc);
+ break;
default:
printf(" (unknown)\n");
break;
@@ -2503,6 +2510,24 @@ uvideo_dump_desc_endpoint(struct uvideo_softc *sc,
}
void
+uvideo_dump_desc_iface_assoc(struct uvideo_softc *sc,
+ const usb_descriptor_t *desc)
+{
+ usb_interface_assoc_descriptor_t *d;
+
+ d = (usb_interface_assoc_descriptor_t *)(uint8_t *)desc;
+
+ printf("bLength=%d\n", d->bLength);
+ printf("bDescriptorType=0x%02x\n", d->bDescriptorType);
+ printf("bFirstInterface=0x%02x\n", d->bFirstInterface);
+ printf("bInterfaceCount=%d\n", d->bInterfaceCount);
+ printf("bFunctionClass=0x%02x\n", d->bFunctionClass);
+ printf("bFunctionSubClass=0x%02x\n", d->bFunctionSubClass);
+ printf("bFunctionProtocol=0x%02x\n", d->bFunctionProtocol);
+ printf("iFunction=0x%02x\n", d->iFunction);
+}
+
+void
uvideo_dump_desc_interface(struct uvideo_softc *sc,
const usb_descriptor_t *desc)
{