[lsusb PATCH] Decode USB 3 Endpoint Companion Descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I got a USB 3 device recently, and was unimpressed by the output from
lsusb -v.  The below patch decodes the SuperSpeed Endpoint Companion
Descriptor; it's against today's usbutils CVS tree.

Index: lsusb.c
===================================================================
RCS file: /cvsroot/linux-usb/usbutils/lsusb.c,v
retrieving revision 1.35
diff -u -r1.35 lsusb.c
--- lsusb.c	5 Jun 2008 06:57:48 -0000	1.35
+++ lsusb.c	19 Apr 2010 01:49:39 -0000
@@ -79,6 +79,10 @@
 #define USB_DT_CS_INTERFACE		0x24
 #define USB_DT_CS_ENDPOINT		0x25
 
+#ifndef USB_DT_SS_ENDPOINT_COMP
+#define USB_DT_SS_ENDPOINT_COMP		0x30
+#endif
+
 #ifndef USB_CLASS_VIDEO
 #define USB_CLASS_VIDEO			0x0e
 #endif
@@ -631,6 +635,9 @@
 			case USB_DT_INTERFACE_ASSOCIATION:
 				dump_association(dev, buf);
 				break;
+			case USB_DT_SS_ENDPOINT_COMP:
+				printf("        bMaxBurst %15u\n", buf[2] + 1);
+				break;
 			default:
 				/* often a misplaced class descriptor */
 				printf("        ** UNRECOGNIZED: ");

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux