adb: remove SendConnectOnHost.
This logic appears to be racy, and it shouldn't actually be needed, if
our devices follow the USB spec. Use libusb_set_interface_alt_setting
on device initialization as well, to add one more thing that should
reset the data toggles.
Bug: http://b/32952319
Test: python test_device.py
Change-Id: I392198af3d72c524b893e5056afa2b4617cea49c
diff --git a/client/usb_libusb.cpp b/client/usb_libusb.cpp
index 7025f28..8120199 100644
--- a/client/usb_libusb.cpp
+++ b/client/usb_libusb.cpp
@@ -333,6 +333,13 @@
return;
}
+ rc = libusb_set_interface_alt_setting(handle.get(), interface_num, 0);
+ if (rc != 0) {
+ LOG(WARNING) << "failed to set interface alt setting for device '" << device_serial
+ << "'" << libusb_error_name(rc);
+ return;
+ }
+
for (uint8_t endpoint : {bulk_in, bulk_out}) {
rc = libusb_clear_halt(handle.get(), endpoint);
if (rc != 0) {