From f3fb7de3c86f14939a67268cf5fc5713dc3c175e Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Tue, 21 Feb 2017 14:37:07 -0800 Subject: [PATCH] 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 --- adb/daemon/usb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/daemon/usb.cpp b/adb/daemon/usb.cpp index ac05d4c2d..c08b922a6 100644 --- a/adb/daemon/usb.cpp +++ b/adb/daemon/usb.cpp @@ -319,7 +319,7 @@ bool init_functionfs(struct usb_handle* h) { D("[ adb: cannot call endpoint alloc: errno=%d ]", errno); // Kernel pre-allocation could have failed for recoverable reasons. // Continue running with a safe max rw size. - h->max_rw *= 2; + h->max_rw = USB_FFS_BULK_SIZE; return true; err: