summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlvin Park <apark@nvidia.com>2013-10-11 13:58:37 +0900
committerPeter Kim <pekim@nvidia.com>2013-10-11 02:19:20 -0700
commit0d86d69ce00e6b93335cf56943a4237e5c7594ec (patch)
tree4d36b87e034ee74cf861e11f0ce18d40052ebdb7 /drivers
parenta9fbbeee1de1d61dda2510cc8eb55a0ade56d93b (diff)
Revert "usb: gadget: mtp: increase MTP buffers"
This reverts commit b64b3f926455e9cfdff90291525f3d5264b97dd4. Bug 1374649 Change-Id: I0c78bfc2c115ff2aad1af232451ba19b08bd8784 Signed-off-by: Alvin Park <apark@nvidia.com> Reviewed-on: http://git-master/r/289520 GVS: Gerrit_Virtual_Submit Reviewed-by: Peter Kim <pekim@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_mtp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/gadget/f_mtp.c b/drivers/usb/gadget/f_mtp.c
index e778d1940bc0..1638977a5410 100644
--- a/drivers/usb/gadget/f_mtp.c
+++ b/drivers/usb/gadget/f_mtp.c
@@ -2,8 +2,6 @@
* Gadget Function Driver for MTP
*
* Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
- *
* Author: Mike Lockwood <lockwood@android.com>
*
* This software is licensed under the terms of the GNU General Public
@@ -38,7 +36,7 @@
#include <linux/usb/ch9.h>
#include <linux/usb/f_mtp.h>
-#define MTP_BULK_BUFFER_SIZE 32768
+#define MTP_BULK_BUFFER_SIZE 16384
#define INTR_BUFFER_SIZE 28
/* String IDs */
@@ -743,7 +741,6 @@ static void receive_file_work(struct work_struct *data)
int64_t count;
int ret, cur_buf = 0;
int r = 0;
- int first_packet = 0;
/* read our parameters */
smp_rmb();
@@ -759,14 +756,8 @@ static void receive_file_work(struct work_struct *data)
read_req = dev->rx_req[cur_buf];
cur_buf = (cur_buf + 1) % RX_REQ_MAX;
- if (first_packet == 0) {
- read_req->length = 16384;
- first_packet = 1;
- } else {
- read_req->length = (count > MTP_BULK_BUFFER_SIZE
+ read_req->length = (count > MTP_BULK_BUFFER_SIZE
? MTP_BULK_BUFFER_SIZE : count);
- }
-
dev->rx_done = 0;
ret = usb_ep_queue(dev->ep_out, read_req, GFP_KERNEL);
if (ret < 0) {