diff options
author | Jack Pham <jackp@codeaurora.org> | 2013-12-23 17:46:10 -0800 |
---|---|---|
committer | Jack Pham <jackp@codeaurora.org> | 2014-01-07 15:04:09 -0800 |
commit | 4cbf1d882236462482b8e22893061604b224e308 (patch) | |
tree | edc88d902f29924150df3bdfab353111b783e288 /fastbootd/network_discovery.h | |
parent | 0afaf7f4dde98ff554b69d05ed87ceab4ec611aa (diff) | |
download | system_core-4cbf1d882236462482b8e22893061604b224e308.zip system_core-4cbf1d882236462482b8e22893061604b224e308.tar.gz system_core-4cbf1d882236462482b8e22893061604b224e308.tar.bz2 |
adbd: Don't close/reopen FFS ep0 on disconnect
In case of bulk read/write failure or disconnect, transport_usb
calls usb_ffs_kick in order to force the daemon to re-open the
FunctionFS ep files as a way to soft restart the kernel driver.
However, there's no reason to always close the ep0 file, as it
would need to be reopened and the descriptors rewritten--this
is unnecessary, especially in the simple/frequent case of cable
disconnect, and causes the kernel driver to unbind and bind *all*
of the function drivers. This is causing USB Chapter 9 tests to fail.
Thus, try to reuse the same ep0 file handle across reconnects. In
case there is a failure, the ep1/ep2 opens would fail and all the
file handles get dropped. For the adb root case, the entire daemon
gets restarted anyway.
Change-Id: I0840085c52a0795dcb2d751c39aa4a436c039ee2
Diffstat (limited to 'fastbootd/network_discovery.h')
0 files changed, 0 insertions, 0 deletions