Skip to content
Snippets Groups Projects
Commit 8c407629 authored by Siqi Lin's avatar Siqi Lin Committed by Yabin Cui
Browse files

Revert "adb: close ep0 on disconnection."

This reverts commit 69e97e4b.

Bug: 28932120
Change-Id: I5e2569abed316c089886556c432bfe59bca08549
(cherry picked from commit 57de0514)
parent 6a29fe93
No related branches found
No related tags found
No related merge requests found
......@@ -400,6 +400,7 @@ static bool init_functionfs(struct usb_handle *h)
v2_descriptor.os_header = os_desc_header;
v2_descriptor.os_desc = os_desc_compat;
if (h->control < 0) { // might have already done this before
D("OPENING %s", USB_FFS_ADB_EP0);
h->control = adb_open(USB_FFS_ADB_EP0, O_RDWR);
if (h->control < 0) {
......@@ -428,6 +429,7 @@ static bool init_functionfs(struct usb_handle *h)
D("[ %s: writing strings failed: errno=%d]", USB_FFS_ADB_EP0, errno);
goto err;
}
}
h->bulk_out = adb_open(USB_FFS_ADB_OUT, O_RDWR);
if (h->bulk_out < 0) {
......@@ -554,7 +556,6 @@ static void usb_ffs_close(usb_handle *h) {
h->kicked = false;
adb_close(h->bulk_out);
adb_close(h->bulk_in);
adb_close(h->control);
// Notify usb_adb_open_thread to open a new connection.
adb_mutex_lock(&h->lock);
h->open_new_connection = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment