Skip to content

Commit

Permalink
usb: gadget: s3c-hsotg: fix can_write limit for non-periodic endpoints
Browse files Browse the repository at this point in the history
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, becouse 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>
  • Loading branch information
Robert Baldyga authored and Felipe Balbi committed Oct 15, 2013
1 parent 8acc829 commit 811f330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,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;

/*
Expand Down

0 comments on commit 811f330

Please sign in to comment.