Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Michael Drake
On 08/12/17 14:27, Greg KH wrote: On Fri, Dec 08, 2017 at 10:30:43AM +, Michael Drake wrote: On 07/12/17 20:04, Greg KH wrote: --- lsusb-v.orig2017-12-07 21:01:26.153185002 +0100 +++ lsusb-v.new 2017-12-07 21:01:32.806517978 +0100 @@ -1110,9 +1110,9 @@ bDescriptorType

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-08 Thread Michael Drake
On 07/12/17 20:04, Greg KH wrote: On Thu, Dec 07, 2017 at 07:24:35PM +, Michael Drake wrote: On 07/12/17 17:26, Greg KH wrote: On Thu, Dec 07, 2017 at 05:14:10PM +, Michael Drake wrote: On 07/12/17 15:16, Greg KH wrote: On Thu, Dec 07, 2017 at 04:01:23PM +0100, Greg KH wrote: Oops

Re: [PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-08 Thread Michael Drake
On 07/12/17 20:02, Greg KH wrote: On Thu, Dec 07, 2017 at 07:18:39PM +, Michael Drake wrote: This fixes a divide by zero which happened when an array, without an explicit entry count (ultimately calculated from the value in the descriptor data's bLength field) was used on field

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-07 Thread Michael Drake
On 07/12/17 17:26, Greg KH wrote: On Thu, Dec 07, 2017 at 05:14:10PM +, Michael Drake wrote: On 07/12/17 15:16, Greg KH wrote: On Thu, Dec 07, 2017 at 04:01:23PM +0100, Greg KH wrote: Oops, I should have tested the code, it now crashes for me with the following error: Floating

[PATCH v1 1/1] lsusb: Fix array entry count for variable sized entries.

2017-12-07 Thread Michael Drake
the entry size from a referenced field. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- desc-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desc-dump.c b/desc-dump.c index 0df0e00..0adf39d 100644 --- a/desc-dump.c +++ b/desc-dump.c @@ -423,7

[PATCH v1 0/1] lsusb: Fix potential floating point exception.

2017-12-07 Thread Michael Drake
This fixes the likely cause of a crash found by Greg. Michael Drake (1): lsusb: Fix array entry count for variable sized entries. desc-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" i

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-07 Thread Michael Drake
On 07/12/17 15:16, Greg KH wrote: On Thu, Dec 07, 2017 at 04:01:23PM +0100, Greg KH wrote: On Thu, Dec 07, 2017 at 04:00:36PM +0100, Greg KH wrote: On Thu, Dec 07, 2017 at 10:26:21AM +, Michael Drake wrote: This adds a new way of dumping descriptors, which splits the knowledge of how

Re: [PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-07 Thread Michael Drake
On 07/12/17 15:00, Greg KH wrote: On Thu, Dec 07, 2017 at 10:26:21AM +, Michael Drake wrote: 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

[PATCH v1 1/2] lsusb: Squash Wpointer-compare warning.

2017-12-07 Thread Michael Drake
replacing the ineffectual/broken one. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- desc-dump.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/desc-dump.c b/desc-dump.c index 5c8e8ae..0df0e00 100644 --- a/desc-dump.c +++ b/desc-dump.c @@ -64,17 +64,1

[PATCH v1 2/2] lsusb: Remove unused function.

2017-12-07 Thread Michael Drake
The get_audioterminal_string() function is now unused. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- lsusb.c | 12 1 file changed, 12 deletions(-) diff --git a/lsusb.c b/lsusb.c index a1b7f8d..1650016 100644 --- a/lsusb.c +++ b/lsusb.c @@ -217,18 +217,6 @@

[PATCH v1 0/2] lsusb: Squash warnings from UAC3 merge.

2017-12-07 Thread Michael Drake
This series is to fix some warnings reported by Greg. Michael Drake (2): lsusb: Squash Wpointer-compare warning. lsusb: Remove unused function. desc-dump.c | 7 +++ lsusb.c | 12 2 files changed, 3 insertions(+), 16 deletions(-) -- 2.11.0 -- To unsubscribe from

[PATCH v2 8/8] lsusb: Dump USB3 BOS Configuration Summary Descriptor.

2017-12-07 Thread Michael Drake
Add support for dumping the configuration summary device capability descriptor to the verbose output of lsusb. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- lsusb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lsusb.c b/lsusb.c index e3eb423..c7a237e

[PATCH v2 7/8] lsusb: Add descriptor definition for USB3 BOS Configuration Summary.

2017-12-07 Thread Michael Drake
Add definition of the BOS configuration summary descriptor, as specified by the USB 3 standard, to the descriptor definitions for lsusb. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- desc-defs.c | 15 +++ desc-defs.h | 3 +++ 2 files changed, 18 inse

[PATCH v2 5/8] lsusb: Add descriptor definitions for UAC3.

2017-12-07 Thread Michael Drake
These descriptor definitions descibe how raw descriptor data should be interpreted. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- desc-defs.c | 338 desc-defs.h | 3 + desc-dump.c | 5 + 3 files change

[PATCH v2 3/8] lsusb: Add code to dump descriptor data using descriptor definition.

2017-12-07 Thread Michael Drake
in its handling of insufficient descriptor data buffer, and junk data at the end of a descriptor. 2. It is easy to add support for new descriptors, since they are now simple definitions that resemble the tables in the USB specifications. Signed-off-by: Michael Drake <michael

[PATCH v2 4/8] lsusb: Switch to descriptor-definition based dump for UAC1 and UAC2.

2017-12-07 Thread Michael Drake
This gives us more consistency in handling of incorrect descriptor buffer lengths, and improves whitespace/alignment consistency. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- Makefile.am | 2 + lsusb.c

[PATCH v2 2/8] lsusb: Add declarative definitions for UAC1 and UAC2 descriptors.

2017-12-07 Thread Michael Drake
These descriptor definitions descibe how raw descriptor data should be interpreted. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- desc-defs.c | 728 desc-defs.h | 153 + 2 files changed, 881 inse

[PATCH v2 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-07 Thread Michael Drake
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

[PATCH v2 1/8] lsusb: Split subtype mapping out of AudioControl interface handling.

2017-12-07 Thread Michael Drake
UAC1 and UAC2 have different different meanings for the same subtype value. This splits the subtype mapping out. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- lsusb.c | 128 +++- 1 file changed, 94 insertions(

[PATCH v2 6/8] lsusb: Add initial support for USB Audio Device Class 3.

2017-12-07 Thread Michael Drake
Make lsusb display verbose descriptor output for USB Audio Devide Class 3 devices. The descriptors have changed for version 3 of the protocol. Signed-off-by: Michael Drake <michael.dr...@codethink.co.uk> --- lsusb.c | 52 ++-- 1 file chang

Re: [PATCH v1 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-06 Thread Michael Drake
On 05/12/17 16:32, Greg KH wrote: On Tue, Dec 05, 2017 at 04:14:23PM +, Michael Drake wrote: 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

Re: [PATCH v1 5/8] lsusb: Add descriptor definitions for UAC3.

2017-12-06 Thread Michael Drake
On 05/12/17 16:39, Greg KH wrote: On Tue, Dec 05, 2017 at 04:14:28PM +, Michael Drake wrote: --- desc-defs.c | 277 desc-defs.h | 3 + desc-dump.c | 5 ++ 3 files changed, 270 insertions(+), 15 deletions(-) We need

Re: [PATCH v1 3/8] lsusb: Add code to dump descriptor data using descriptor definition.

2017-12-06 Thread Michael Drake
On 05/12/17 16:38, Greg KH wrote: On Tue, Dec 05, 2017 at 04:14:26PM +, Michael Drake wrote: This adds a new way of dumping descriptors. It takes the descriptor data to be dumped, and a descriptor definition as input. The descriptor definition takes the form of a NULL terminated array

Re: [PATCH v1 2/8] lsusb: Add declarative definitions for UAC1 and UAC2 descriptors.

2017-12-06 Thread Michael Drake
On 05/12/17 16:37, Greg KH wrote: On Tue, Dec 05, 2017 at 04:14:25PM +, Michael Drake wrote: These descriptor definitions descibe how raw descriptor data should be interpreted. --- desc-defs.c | 647 desc-defs.h | 153

Re: [PATCH v1 1/8] lsusb: Split subtype mapping out of AudioControl interface handling.

2017-12-06 Thread Michael Drake
On 05/12/17 16:31, Greg KH wrote: On Tue, Dec 05, 2017 at 04:14:24PM +, Michael Drake wrote: UAC1 and UAC2 have different different meanings for the same subtype value. This splits the subtype mapping out. --- Minor nit, can you sign-off on your patches like kernel patches have? That way

[PATCH v1 5/8] lsusb: Add descriptor definitions for UAC3.

2017-12-05 Thread Michael Drake
--- desc-defs.c | 277 desc-defs.h | 3 + desc-dump.c | 5 ++ 3 files changed, 270 insertions(+), 15 deletions(-) diff --git a/desc-defs.c b/desc-defs.c index 6bc558e..3b5ea1e 100644 --- a/desc-defs.c +++ b/desc-defs.c @@ -61,6

[PATCH v1 2/8] lsusb: Add declarative definitions for UAC1 and UAC2 descriptors.

2017-12-05 Thread Michael Drake
(C) 2017 Michael Drake <michael.dr...@codethink.co.uk> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the L

[PATCH v1 6/8] lsusb: Add initial support for UAC3.

2017-12-05 Thread Michael Drake
--- lsusb.c | 52 ++-- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/lsusb.c b/lsusb.c index ac6e061..c9d0d74 100644 --- a/lsusb.c +++ b/lsusb.c @@ -106,6 +106,11 @@ #define USB_AUDIO_CLASS_2 0x20 #endif +/* USB

[PATCH v1 7/8] lsusb: Add descriptor definition for USB3 BOS Configuration Summary.

2017-12-05 Thread Michael Drake
--- desc-defs.c | 16 desc-defs.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/desc-defs.c b/desc-defs.c index 3b5ea1e..885e3fa 100644 --- a/desc-defs.c +++ b/desc-defs.c @@ -892,3 +892,19 @@ const struct desc * const desc_audio_as_isochronous_audio_data_endpoint[3]

[PATCH v1 3/8] lsusb: Add code to dump descriptor data using descriptor definition.

2017-12-05 Thread Michael Drake
@@ +/*/ + +/* + * desc-dump.c -- USB descriptor dumping + * + * Copyright (C) 2017 Michael Drake <michael.dr...@codethink.co.uk> + * + * This program is free software; you can redistribute it and/or

[PATCH v1 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-05 Thread Michael Drake
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 Michael Drake (8): lsusb: Split subtype mapping out of AudioControl interface handling

[PATCH v1 1/8] lsusb: Split subtype mapping out of AudioControl interface handling.

2017-12-05 Thread Michael Drake
UAC1 and UAC2 have different different meanings for the same subtype value. This splits the subtype mapping out. --- lsusb.c | 100 ++-- 1 file changed, 79 insertions(+), 21 deletions(-) diff --git a/lsusb.c b/lsusb.c index

[PATCH v1 4/8] lsusb: Switch to descriptor-definition based dump for UAC1 and UAC2.

2017-12-05 Thread Michael Drake
This gives us more consistency in handling of incorrect descriptor buffer lengths, and improves whitespace/alignment consistency. --- Makefile.am | 2 + lsusb.c | 779 +--- 2 files changed, 63 insertions(+), 718 deletions(-) diff

[PATCH v1 8/8] lsusb: Dump USB3 BOS Configuration Summary Descriptor.

2017-12-05 Thread Michael Drake
--- lsusb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lsusb.c b/lsusb.c index c9d0d74..ddc19e0 100644 --- a/lsusb.c +++ b/lsusb.c @@ -75,6 +75,7 @@ #define USB_DC_PLATFORM0x05 #define USB_DC_SUPERSPEEDPLUS 0x0a #define USB_DC_BILLBOARD