MLK-23181-2 usb: cdns3: gadget: add one missing condition for cdns3_request_handled
If the dequeue pointer advances to the first trb, but the priv_req->end_trb is the last trb, we consider the trb this dequeue pointer points doesn't belong to this request. Reviewed-by: Jun Li <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
adb129da17
commit
3e7c6dff3e
|
@ -840,9 +840,13 @@ static bool cdns3_request_handled(struct cdns3_endpoint *priv_ep,
|
|||
priv_ep->trb_pool_dma) / TRB_SIZE;
|
||||
|
||||
/* current trb doesn't belong to this request */
|
||||
if ((priv_req->start_trb < priv_req->end_trb) &&
|
||||
(priv_ep->dequeue > priv_req->end_trb))
|
||||
goto finish;
|
||||
if (priv_req->start_trb < priv_req->end_trb) {
|
||||
if (priv_ep->dequeue > priv_req->end_trb)
|
||||
goto finish;
|
||||
|
||||
if (priv_ep->dequeue < priv_req->start_trb)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if ((priv_req->start_trb > priv_req->end_trb) &&
|
||||
(priv_ep->dequeue > priv_req->end_trb) &&
|
||||
|
|
Loading…
Reference in New Issue