summaryrefslogtreecommitdiffstats
path: root/fastboot
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-08 23:04:58 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-08 23:04:58 +0000
commitab0d542506b5fdbcc431ba2606248471d22322ba (patch)
tree2db74cea2b200ebcd57b43bf28cd61de46138413 /fastboot
parentdbb7c46d686e55aabd52a8e4c5494768c8955a2f (diff)
parent1c02213e89f99c6f532b27048feb8f3170cac296 (diff)
downloadsystem_core-ab0d542506b5fdbcc431ba2606248471d22322ba.zip
system_core-ab0d542506b5fdbcc431ba2606248471d22322ba.tar.gz
system_core-ab0d542506b5fdbcc431ba2606248471d22322ba.tar.bz2
Merge "fastboot: Support USB 3.x SuperSpeed devices on Linux"
Diffstat (limited to 'fastboot')
-rw-r--r--fastboot/usb_linux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c
index fabbd51..022f364 100644
--- a/fastboot/usb_linux.c
+++ b/fastboot/usb_linux.c
@@ -223,6 +223,13 @@ static int filter_usb_device(char* sysfs_name,
} else {
out = ept->bEndpointAddress;
}
+
+ // For USB 3.0 devices skip the SS Endpoint Companion descriptor
+ if (check((struct usb_descriptor_hdr *)ptr, len,
+ USB_DT_SS_ENDPOINT_COMP, USB_DT_SS_EP_COMP_SIZE) == 0) {
+ len -= USB_DT_SS_EP_COMP_SIZE;
+ ptr += USB_DT_SS_EP_COMP_SIZE;
+ }
}
info.has_bulk_in = (in != -1);