arch/{nrf52|nrf53}/usbd: fix IN endpoint completion logic
Confirmation of the IN request must be done immediately after all data has been transferred, otherwise sending data when more than one request has been added to the queue will not work properly.
This commit is contained in:
parent
5f5ffa9380
commit
20af03b31e
@ -1143,7 +1143,9 @@ static void nrf52_epin_request(struct nrf52_usbdev_s *priv,
|
|||||||
privreq->req.xfrd += nbytes;
|
privreq->req.xfrd += nbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (privreq->req.xfrd >= privreq->req.len)
|
/* Has all the request data been sent? */
|
||||||
|
|
||||||
|
if (privreq->req.xfrd >= privreq->req.len)
|
||||||
{
|
{
|
||||||
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
||||||
|
|
||||||
|
@ -1143,7 +1143,9 @@ static void nrf53_epin_request(struct nrf53_usbdev_s *priv,
|
|||||||
privreq->req.xfrd += nbytes;
|
privreq->req.xfrd += nbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (privreq->req.xfrd >= privreq->req.len)
|
/* Has all the request data been sent? */
|
||||||
|
|
||||||
|
if (privreq->req.xfrd >= privreq->req.len)
|
||||||
{
|
{
|
||||||
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user