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
parent
fe3ef5b253
commit
5435fea4a1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue