This adds a new way of dumping descriptors, which splits the knowledge of how to interpret descriptor data from the actual dumping. This has two advantages: 1. It is easy to add support for new descriptors, since they are now simple definitions that resemble the tables in the USB specifications. 2. The code for dumping descriptors is common, so the output is easy to keep consistent. It is also consistent and thorough in its handling of insufficient descriptor data buffer, and junk data at the end of a descriptor. UAC1 and UAC2 are converted to use the new mechanism, initial support for UAC3 is added. Finally, support for the USB3 BOS Configuration Summary Descriptor is added. This was previously opened as a github pull request here: https://github.com/gregkh/usbutils/pull/61 Changes since v2: - Signed off commits. - Added detail sections to all commit messages. - Single blank lines between things. - Improved comments. - Designated initilisers for arrays of bmControls bit names. - Added default to subtype mapping switch. - Fixed subtype mapping commit to make use of the enum in the switch that switches on subtype. - Removed redundant #ifdef around #include "config.h" - Fixed use of magic numbers in wFormatTag snowflake renderer. Michael Drake (8): lsusb: Split subtype mapping out of AudioControl interface handling. lsusb: Add declarative definitions for UAC1 and UAC2 descriptors. lsusb: Add code to dump descriptor data using descriptor definition. lsusb: Switch to descriptor-definition based dump for UAC1 and UAC2. lsusb: Add descriptor definitions for UAC3. lsusb: Add initial support for USB Audio Device Class 3. lsusb: Add descriptor definition for USB3 BOS Configuration Summary. lsusb: Dump USB3 BOS Configuration Summary Descriptor. Makefile.am | 2 + desc-defs.c | 995 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ desc-defs.h | 159 ++++++++++ desc-dump.c | 546 +++++++++++++++++++++++++++++++++ desc-dump.h | 64 ++++ lsusb.c | 887 ++++++++++------------------------------------------- 6 files changed, 1923 insertions(+), 730 deletions(-) create mode 100644 desc-defs.c create mode 100644 desc-defs.h create mode 100644 desc-dump.c create mode 100644 desc-dump.h -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html