summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorRobert Baldyga2013-09-24 11:24:28 +0200
committerFelipe Balbi2013-10-01 16:24:14 +0200
commitb377216bd2d313b393ddd4b04c71f700842d104b (patch)
tree7952edab37dd2c06e5030bb41918f8a548bee478 /drivers/usb/gadget
parentusb: gadget: f_fs: fix error handling (diff)
downloadkernel-qcow2-linux-b377216bd2d313b393ddd4b04c71f700842d104b.tar.gz
kernel-qcow2-linux-b377216bd2d313b393ddd4b04c71f700842d104b.tar.xz
kernel-qcow2-linux-b377216bd2d313b393ddd4b04c71f700842d104b.zip
usb: gadget: s3c-hsotg: fix can_write limit for non-periodic endpoints
Value of can_write variable in s3c_hsotg_write_fifo function should be limited to 512 only for non-periodic endpoints. There was some discrepancy between comment and code, because comment suggests correct behavior, but in the code limit was applied to periodic endpoints too. So there is additional check causing the limitation concerns only non-periodic endpoints. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 6bddf1aa2347..a8a99e4748d5 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -543,7 +543,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
* FIFO, requests of >512 cause the endpoint to get stuck with a
* fragment of the end of the transfer in it.
*/
- if (can_write > 512)
+ if (can_write > 512 && !periodic)
can_write = 512;
/*