]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
USB: serial gadget: descriptor cleanup
authorDavid Brownell <david-b@pacbell.net>
Wed, 7 May 2008 21:27:37 +0000 (14:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 May 2008 17:00:28 +0000 (10:00 -0700)
Bugfix some serial gadget descriptors:

 - Stop mangling the low bits (controller type ID) of bcdDevice;
   just use the high bits for a driver revision code.

 - Serial numbers that aren't specific to individual devices
   are useless; stop reporting "0" for this.

 - Since it's not part of a CDC-conformant function, the "bulk only"
   configuration shouldn't be using "CDC Data" as its interface class.
   Switch over to using CLASS_VENDOR_SPEC (different value, 0xff).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/serial.c

index 0829027d929693d46f69a230e6f12a74385eb69b..fa019fa733346591a1c3c0a16a458f52ee9b423c 100644 (file)
@@ -32,7 +32,7 @@
 /* Defines */
 
 #define GS_VERSION_STR                 "v2.2"
-#define GS_VERSION_NUM                 0x0202
+#define GS_VERSION_NUM                 0x2200
 
 #define GS_LONG_NAME                   "Gadget Serial"
 #define GS_SHORT_NAME                  "g_serial"
@@ -218,7 +218,6 @@ static char manufacturer[50];
 static struct usb_string gs_strings[] = {
        { GS_MANUFACTURER_STR_ID, manufacturer },
        { GS_PRODUCT_STR_ID, GS_LONG_NAME },
-       { GS_SERIAL_STR_ID, "0" },
        { GS_BULK_CONFIG_STR_ID, "Gadget Serial Bulk" },
        { GS_ACM_CONFIG_STR_ID, "Gadget Serial CDC ACM" },
        { GS_CONTROL_STR_ID, "Gadget Serial Control" },
@@ -241,7 +240,6 @@ static struct usb_device_descriptor gs_device_desc = {
        .idProduct =            __constant_cpu_to_le16(GS_PRODUCT_ID),
        .iManufacturer =        GS_MANUFACTURER_STR_ID,
        .iProduct =             GS_PRODUCT_STR_ID,
-       .iSerialNumber =        GS_SERIAL_STR_ID,
        .bNumConfigurations =   GS_NUM_CONFIGS,
 };
 
@@ -278,7 +276,7 @@ static const struct usb_interface_descriptor gs_bulk_interface_desc = {
        .bDescriptorType =      USB_DT_INTERFACE,
        .bInterfaceNumber =     GS_BULK_INTERFACE_ID,
        .bNumEndpoints =        2,
-       .bInterfaceClass =      USB_CLASS_CDC_DATA,
+       .bInterfaceClass =      USB_CLASS_VENDOR_SPEC,
        .bInterfaceSubClass =   0,
        .bInterfaceProtocol =   0,
        .iInterface =           GS_DATA_STR_ID,