6e9a327504e6aa2488b736fd5592525278a0916f |
|
20-Mar-2018 |
Jerry Zhang <zhangjerry@google.com> |
adb: Retry io in case of interrupt io_submit sleeps waiting for the gadget to be enabled. Currently if that sleep is interrupted it will shut down adb, causing it to have to start back up again. Rather than return EINTR if interrupted, io_submit actually completes and the EINTR is found later when looking through events. Since an io that is interrupted will be small anyway, add a loop to retry small ios. Also upgrade aio logs in accordance with their importance. Fixes: 75981904 Test: adb works, logs show successful interrupt handling Change-Id: I35973fce130ee849ce59fef80d15b65afb816ba4
/system/core/adb/daemon/usb.cpp
|
9a1be3ad0eb874b4bc6a2c4ad98f2d89af3e1bf5 |
|
14-Mar-2018 |
Jerry Zhang <zhangjerry@google.com> |
adb: Remove usages of ENDPOINT_ALLOC All devices that previously used ENDPOINT_ALLOC are on the new async io routines. None of the devices using aio_compat have ENDPOINT_ALLOC so remove the code to stop logging failures. Fixes: 74213465 Test: adb works Change-Id: I0c903eb76b006b6bcce48cec24f5353fa47cc128
/system/core/adb/daemon/usb.cpp
|
ecee434faea553dd190550355bf2ecfde2794059 |
|
18-Jul-2017 |
Jerry Zhang <zhangjerry@google.com> |
adb: Use kernel aio for functionfs. This method works around the downsides of ENDPOINT_ALLOC, namely that it is not affected by memory fragmentation and it uses an upstream interface. Also add libasyncio to provide the necessary syscalls to both adb and mtp. Add some small optimizations to file_sync. Bug: 37916658 Test: run adb push/pull Change-Id: If3b3be02b5e2d4f9cffec1b8ddc02a5768a51a1f
/system/core/adb/daemon/usb.cpp
|
184f571cfdf544963cff7450451dff081aa6e626 |
|
26-Jul-2017 |
Josh Gao <jmgao@google.com> |
adbd: add logging to troubleshoot usb issues. Bug: http://b/63899881 Bug: http://b/63901259 Bug: http://b/63904904 Test: treehugger Change-Id: Ifbc3caa6b416093bf8e127194003747c910352dc
/system/core/adb/daemon/usb.cpp
|
40a87784913066f74c2f7a1e9f5f54aaf4692364 |
|
28-Apr-2017 |
Jerry Zhang <zhangjerry@google.com> |
Revert "adb: Lower EP_ALLOC retry count" This reverts commit 05fe272a87c6be24d3e2808ecceed2be063b9c1d. Commit "adb: Do not signal gaget stack unless descriptors are written" fixed the main issue for configfs devices where device wasn't enabled until after the ioctl was attempted. Thus it is safe to bring up the retry count so that the ioctl doesn't fail due to small delays in usb stack. Test: use adb, switch configs on configfs devices
/system/core/adb/daemon/usb.cpp
|
e1dacfc1b65b04958924d1f982263d4aa71b0b94 |
|
13-Apr-2017 |
Josh Gao <jmgao@google.com> |
adb: kill adb_thread_{create, join, detach, exit}. We have std::thread now, so we can delete this cruft. Test: python test_device.py Test: adb_test Test: wine adb_test.exe Test: /data/nativetest/adbd_test/adbd_test Change-Id: Ie1c1792547b20dec45e2a62ce6515fcb981c3ef8
/system/core/adb/daemon/usb.cpp
|
43fd1a4ea72ec96de2790a6703722e900b354de6 |
|
08-Mar-2017 |
Badhri Jagan Sridharan <Badhri@google.com> |
adb: Do not signal gaget stack unless descriptors are written While recovering from endpoint errors, the gadget stack was being signalled even when desriptors were NOT being rewritten. Avoid this as this might cause enumeration loops. Bug: 36036550 Change-Id: Iff2b2fc8cded001ef3c77dc170dce3b96848970c
/system/core/adb/daemon/usb.cpp
|
f3fb7de3c86f14939a67268cf5fc5713dc3c175e |
|
21-Feb-2017 |
Jerry Zhang <zhangjerry@google.com> |
adb: set max_rw to USB_FFS_BULK_SIZE explicitly Sometimes when endpoint_alloc returns ENODEV, max_rw will end up being a value that is too big. Bug: 35634401 Test: push/pull files Change-Id: Iaa81a3311b1855e2a835562cdf7a46ff4399feb1
/system/core/adb/daemon/usb.cpp
|
05fe272a87c6be24d3e2808ecceed2be063b9c1d |
|
16-Feb-2017 |
Jerry Zhang <zhangjerry@google.com> |
adb: Lower EP_ALLOC retry count Retries were causing timeouts on some devices. Bug: 35418581 Test: Change usb config Change-Id: Ie80d9eba1cb9af0acee49bd7312842533a94a87b
/system/core/adb/daemon/usb.cpp
|
b5a34a2bce41d3f944223a1d8c7a10599802af36 |
|
11-Feb-2017 |
Jerry Zhang <zhangjerry@google.com> |
adb: Add bMaxBurst to superspeed descriptors This gives a large boost to speed on usb 3.0. Test: adb pull/push multi GB files Bug: 31722483 Change-Id: Iea039f1aba8b2e4d7e4a2ecb504cccb5dd1e4629
/system/core/adb/daemon/usb.cpp
|
55205a565b573a40a65b41645d8b88f0a6f4f13d |
|
04-Jan-2017 |
Jerry Zhang <zhangjerry@google.com> |
adb: Pre allocate kernel memory This allows reliable use of larger buffer sizes. Max r/w size is set only when that preallocation is successful so that memory is guaranteed to be available. Bug: 31722483 Test: adb push with multi GB files Change-Id: Ia0459ca051988abb144645871792e8f840dd3ff7
/system/core/adb/daemon/usb.cpp
|
44c688ca19a570b4d73f92f34d410e62ef491f0a |
|
12-Jan-2017 |
Josh Gao <jmgao@google.com> |
adb: reorganize adbd USB handling code. Break adbd's USB initialization code into its own static library to allow it to be used by benchmark code that pretends to be adbd. Bug: http://b/31289465 Test: adb shell works on bullhead Change-Id: I0ac7d78a4f7aef59bd6d14fc5cf1ed870e1f3a9d
/system/core/adb/daemon/usb.cpp
|