Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f05fbe69 authored by Josh Gao's avatar Josh Gao Committed by Gerrit Code Review
Browse files

Merge "adbd: reduce the USB buffer sizes to 16k."

parents 5c421695 770a6a4d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -57,11 +57,12 @@ using android::base::StringPrintf;
// We can't find out whether we have support for AIO on ffs endpoints until we submit a read.
static std::optional<bool> gFfsAioSupported;

// Not all USB controllers support operations larger than 16k, so don't go above that.
static constexpr size_t kUsbReadQueueDepth = 32;
static constexpr size_t kUsbReadSize = 8 * PAGE_SIZE;
static constexpr size_t kUsbReadSize = 4 * PAGE_SIZE;

static constexpr size_t kUsbWriteQueueDepth = 32;
static constexpr size_t kUsbWriteSize = 8 * PAGE_SIZE;
static constexpr size_t kUsbWriteSize = 4 * PAGE_SIZE;

static const char* to_string(enum usb_functionfs_event_type type) {
    switch (type) {