Change adb protocol to sdb protocol
authorChengwei Yang <chengwei.yang@intel.com>
Wed, 17 Oct 2012 03:06:38 +0000 (11:06 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Wed, 17 Oct 2012 03:31:55 +0000 (11:31 +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.

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

index 56c596e..04f2fd0 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 = {