ANDROID: usb: gadget: f_mtp: increase default Tx/Rx buf size to 64K

The test results indicate that larger transfers improve
mtp read/write speeds. The Tx/Rx request transfer length
is now 16K bytes. Increase the Tx/Rx transfer length from
16K to 64K to get good throughputs.

For USB DWC3 controller, you can try to increase the
Tx/Rx transfer length from 16K to 1MB to get better
throughputs.

Change-Id: If5ac41685acdc9b9d2db7f7f79e183e3dff7b558
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu 2017-12-21 15:45:14 +08:00 committed by Tao Huang
parent 3957ac7db1
commit 8bc55ddcea

View File

@ -42,6 +42,8 @@
#include "configfs.h"
#define MTP_RX_BUFFER_INIT_SIZE 65536
#define MTP_TX_BUFFER_INIT_SIZE 65536
#define MTP_BULK_BUFFER_SIZE 16384
#define INTR_BUFFER_SIZE 28
#define MAX_INST_NAME_LEN 40
@ -78,10 +80,10 @@
#define MAX_ITERATION 100
static unsigned int mtp_rx_req_len = MTP_BULK_BUFFER_SIZE;
static unsigned int mtp_rx_req_len = MTP_RX_BUFFER_INIT_SIZE;
module_param(mtp_rx_req_len, uint, 0644);
static unsigned int mtp_tx_req_len = MTP_BULK_BUFFER_SIZE;
static unsigned int mtp_tx_req_len = MTP_TX_BUFFER_INIT_SIZE;
module_param(mtp_tx_req_len, uint, 0644);
static unsigned int mtp_tx_reqs = MTP_TX_REQ_MAX;