usb: gadget: adb: Force OUT(or RX) requests size to be MAX

Synopsys USB3 Controller (DWC3) has a restriction where size
of OUT requests (TRB) queued to the controller must be aligned
with the endpoint's max packet size.
Since, request buffer is already allocated with the size of
ADB_BULK_BUFFER_SIZE, hence, request this much data from the
controller.

Change-Id: Ibba1a627c9e34b92ddcb44ee2260a004a2b78dfc
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
This commit is contained in:
Ido Shayevitz 2012-08-23 05:30:04 +03:00 committed by Iliyan Malchev
parent d49e29a573
commit e9c6f3205b

View file

@ -303,7 +303,7 @@ static ssize_t adb_read(struct file *fp, char __user *buf,
requeue_req:
/* queue a request */
req = dev->rx_req;
req->length = count;
req->length = ADB_BULK_BUFFER_SIZE;
dev->rx_done = 0;
ret = usb_ep_queue(dev->ep_out, req, GFP_ATOMIC);
if (ret < 0) {