From 9026a44bb3382a15d07189e2826ef1e1d8bc2504 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Mon, 6 Apr 2020 16:49:01 -0700 Subject: [PATCH] Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor"" This reverts commit bfe3dac36d43208bb23aac56b0f156b8892d9d13. This seems to be correlated with an increase in the rate of devices going offline. Revert it to see if failure rates improve. Bug: http://b/150863651 Test: treehugger Change-Id: Ia6163fd9e31d2bf812628e028249662594ac2024 --- adb/daemon/usb_ffs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/daemon/usb_ffs.cpp b/adb/daemon/usb_ffs.cpp index 7bd611b66..e538ca885 100644 --- a/adb/daemon/usb_ffs.cpp +++ b/adb/daemon/usb_ffs.cpp @@ -300,7 +300,6 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu } // Signal only when writing the descriptors to ffs android::base::SetProperty("sys.usb.ffs.ready", "1"); - *out_control = std::move(control); } bulk_out.reset(adb_open(USB_FFS_ADB_OUT, O_RDONLY)); @@ -315,6 +314,7 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu return false; } + *out_control = std::move(control); *out_bulk_in = std::move(bulk_in); *out_bulk_out = std::move(bulk_out); return true;