Skip to content

Commit b377216

Browse files
Robert BaldygaFelipe Balbi
authored andcommitted
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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 8854894 commit b377216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/s3c-hsotg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
543543
* FIFO, requests of >512 cause the endpoint to get stuck with a
544544
* fragment of the end of the transfer in it.
545545
*/
546-
if (can_write > 512)
546+
if (can_write > 512 && !periodic)
547547
can_write = 512;
548548

549549
/*

0 commit comments

Comments
 (0)