@@ -337,19 +337,6 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep)
337337 cdns3_ep_inc_trb (& priv_ep -> dequeue , & priv_ep -> ccs , priv_ep -> num_trbs );
338338}
339339
340- static void cdns3_move_deq_to_next_trb (struct cdns3_request * priv_req )
341- {
342- struct cdns3_endpoint * priv_ep = priv_req -> priv_ep ;
343- int current_trb = priv_req -> start_trb ;
344-
345- while (current_trb != priv_req -> end_trb ) {
346- cdns3_ep_inc_deq (priv_ep );
347- current_trb = priv_ep -> dequeue ;
348- }
349-
350- cdns3_ep_inc_deq (priv_ep );
351- }
352-
353340/**
354341 * cdns3_allow_enable_l1 - enable/disable permits to transition to L1.
355342 * @priv_dev: Extended gadget object
@@ -1517,10 +1504,11 @@ static void cdns3_transfer_completed(struct cdns3_device *priv_dev,
15171504
15181505 trb = priv_ep -> trb_pool + priv_ep -> dequeue ;
15191506
1520- /* Request was dequeued and TRB was changed to TRB_LINK. */
1521- if (TRB_FIELD_TO_TYPE (le32_to_cpu (trb -> control )) == TRB_LINK ) {
1507+ /* The TRB was changed as link TRB, and the request was handled at ep_dequeue */
1508+ while (TRB_FIELD_TO_TYPE (le32_to_cpu (trb -> control )) == TRB_LINK ) {
15221509 trace_cdns3_complete_trb (priv_ep , trb );
1523- cdns3_move_deq_to_next_trb (priv_req );
1510+ cdns3_ep_inc_deq (priv_ep );
1511+ trb = priv_ep -> trb_pool + priv_ep -> dequeue ;
15241512 }
15251513
15261514 if (!request -> stream_id ) {
0 commit comments