diff options
author | Channagoud Kadabi <ckadabi@codeaurora.org> | 2014-11-05 16:59:27 -0800 |
---|---|---|
committer | Channagoud Kadabi <ckadabi@codeaurora.org> | 2014-11-07 12:01:33 -0800 |
commit | b2117739eda5174f7365e8918e708ac256797974 (patch) | |
tree | b94cf13f6dc7d322f37c1c8ae701fb03e1a0149a | |
parent | 2655256570b7c1c5af6d886735835eecb99f45f2 (diff) | |
download | system_core-b2117739eda5174f7365e8918e708ac256797974.zip system_core-b2117739eda5174f7365e8918e708ac256797974.tar.gz system_core-b2117739eda5174f7365e8918e708ac256797974.tar.bz2 |
system: core: fastboot: Increase USB protocol buffer size to 1024
With USB3.0 SS support the max packet size supported by USB protocol
is 1024 bytes. When connected to a USB device in SuperSpeed, if only
512 bytes are sent at a time the device would interpret each transfer
as a short packet and slows down overall throughput. To accommodate
for SuperSpeed USB bulk endpoints, increase the buffer size to 1024.
Change-Id: I4f447fe38045bc0008e2d6dd3f36c2d6819d6c15
-rw-r--r-- | fastboot/fastboot_protocol.txt | 4 | ||||
-rw-r--r-- | fastboot/protocol.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fastboot/fastboot_protocol.txt b/fastboot/fastboot_protocol.txt index 2248992..37b1959 100644 --- a/fastboot/fastboot_protocol.txt +++ b/fastboot/fastboot_protocol.txt @@ -12,8 +12,8 @@ Basic Requirements ------------------ * Two bulk endpoints (in, out) are required -* Max packet size must be 64 bytes for full-speed and 512 bytes for - high-speed USB +* Max packet size must be 64 bytes for full-speed, 512 bytes for + high-speed and 1024 bytes for Super Speed USB. * The protocol is entirely host-driven and synchronous (unlike the multi-channel, bi-directional, asynchronous ADB protocol) diff --git a/fastboot/protocol.c b/fastboot/protocol.c index 84e9837..10a84c1 100644 --- a/fastboot/protocol.c +++ b/fastboot/protocol.c @@ -216,7 +216,7 @@ int fb_download_data(usb_handle *usb, const void *data, unsigned size) } } -#define USB_BUF_SIZE 512 +#define USB_BUF_SIZE 1024 static char usb_buf[USB_BUF_SIZE]; static int usb_buf_len; |