1
0
Fork 0

MLK-23809-1 usb: cdns3: gadget: calculate actual length correctly

For each request, it needs to clear transfer_end, otherwise,
the second transfer's actual transfer length will not
report to class driver if the first transfer is short and both
the two transfers are handled in the same threaded irq handler.

Reviewed-by: Jun Li <jun.li@nxp.com>
Reported-by: Faqiang Zhu <faqiang.zhu@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peter Chen 2020-04-20 11:39:23 +08:00
parent fe3ef5b253
commit 5435fea4a1
No known key found for this signature in database
GPG Key ID: 4859298150D671BB
1 changed files with 1 additions and 0 deletions

View File

@ -975,6 +975,7 @@ static void cdns3_transfer_completed(struct cdns3_device *priv_dev,
if (request_handled) {
cdns3_gadget_giveback(priv_ep, priv_req, 0);
request_handled = false;
transfer_end = false;
} else {
return;
}