Change adb protocol to sdb protocol
authorChengwei Yang <chengwei.yang@intel.com>
Fri, 7 Jun 2013 02:55:23 +0000 (10:55 +0800)
committerYin Kangkai <kangkai.yin@linux.intel.com>
Thu, 26 Dec 2013 14:33:48 +0000 (22:33 +0800)
Currently, we have a forked sdbd for our kernel so there was no need to
patch our kernel.

However, the forked sdbd will be merged to upstream sdbd and to make it
compatible with adb in userspace cost a large effort.

So the better way is patch our kernel to adopt sdb protocol, on the
other hand, no patch needed to sdbd user space server and client.

Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
drivers/usb/gadget/f_adb.c

index 3c48960..ccfc279 100644 (file)
@@ -32,7 +32,7 @@
 /* number of tx requests to allocate */
 #define TX_REQ_MAX 4
 
-static const char adb_shortname[] = "android_adb";
+static const char adb_shortname[] = "samsung_sdb";
 
 struct adb_dev {
        struct usb_function function;
@@ -63,8 +63,8 @@ static struct usb_interface_descriptor adb_interface_desc = {
        .bInterfaceNumber       = 0,
        .bNumEndpoints          = 2,
        .bInterfaceClass        = 0xFF,
-       .bInterfaceSubClass     = 0x42,
-       .bInterfaceProtocol     = 1,
+       .bInterfaceSubClass     = 0x20,
+       .bInterfaceProtocol     = 2,
 };
 
 static struct usb_endpoint_descriptor adb_highspeed_in_desc = {