提交 811f3303 编写于 作者: R Robert Baldyga 提交者: Felipe Balbi

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, 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: NRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 8acc8296
...@@ -552,7 +552,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, ...@@ -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 * FIFO, requests of >512 cause the endpoint to get stuck with a
* fragment of the end of the transfer in it. * fragment of the end of the transfer in it.
*/ */
if (can_write > 512) if (can_write > 512 && !periodic)
can_write = 512; can_write = 512;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册