diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-12-09 23:04:19 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-10 00:23:02 +0300 |
commit | 3150a73366b64e3109f0facbc98bcacbc14e81ba (patch) | |
tree | 2b94b32c5fe97a4e76058a6f65e8c5717b53ee16 /drivers/usb/cdns3/cdns3-gadget.c | |
parent | 1a2fb220edca98d18f90e3ef5bd6853a6b22b1b8 (diff) | |
parent | ded746bfc94398d2ee9de315a187677b207b2004 (diff) | |
download | linux-3150a73366b64e3109f0facbc98bcacbc14e81ba.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.c')
-rw-r--r-- | drivers/usb/cdns3/cdns3-gadget.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c index 1f3b4a142212..f9af7ebe003d 100644 --- a/drivers/usb/cdns3/cdns3-gadget.c +++ b/drivers/usb/cdns3/cdns3-gadget.c @@ -337,19 +337,6 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep) cdns3_ep_inc_trb(&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs); } -static void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req) -{ - struct cdns3_endpoint *priv_ep = priv_req->priv_ep; - int current_trb = priv_req->start_trb; - - while (current_trb != priv_req->end_trb) { - cdns3_ep_inc_deq(priv_ep); - current_trb = priv_ep->dequeue; - } - - cdns3_ep_inc_deq(priv_ep); -} - /** * cdns3_allow_enable_l1 - enable/disable permits to transition to L1. * @priv_dev: Extended gadget object @@ -1517,10 +1504,11 @@ static void cdns3_transfer_completed(struct cdns3_device *priv_dev, trb = priv_ep->trb_pool + priv_ep->dequeue; - /* Request was dequeued and TRB was changed to TRB_LINK. */ - if (TRB_FIELD_TO_TYPE(le32_to_cpu(trb->control)) == TRB_LINK) { + /* The TRB was changed as link TRB, and the request was handled at ep_dequeue */ + while (TRB_FIELD_TO_TYPE(le32_to_cpu(trb->control)) == TRB_LINK) { trace_cdns3_complete_trb(priv_ep, trb); - cdns3_move_deq_to_next_trb(priv_req); + cdns3_ep_inc_deq(priv_ep); + trb = priv_ep->trb_pool + priv_ep->dequeue; } if (!request->stream_id) { |