mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
usb: dwc3: gadget: clear HWO when move req to pending list
Clear the HWO of TRB belongs to the current req which will
be moved to the pending list, rather than clear the HWO
of previous TRB in the ring.
Fixes: 05c86e9eef ("usb: dwc3: gadget: fix bug of clac_trbs_left at isoc in transfer")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If11c296db902631587cf36731242d12ddb5c4c28
This commit is contained in:
@@ -2613,12 +2613,12 @@ static int dwc3_gadget_ep_cleanup_completed_request(struct dwc3_ep *dep,
|
||||
*/
|
||||
req->remaining = 0;
|
||||
req->needs_extra_trb = false;
|
||||
dwc3_gadget_move_queued_request(req);
|
||||
if (req->trb)
|
||||
usb_gadget_unmap_request_by_dev(dwc->sysdev,
|
||||
&req->request,
|
||||
req->direction);
|
||||
req->trb = NULL;
|
||||
dwc3_gadget_move_queued_request(req);
|
||||
} else {
|
||||
__dwc3_gadget_kick_transfer(dep);
|
||||
}
|
||||
|
||||
@@ -74,14 +74,9 @@ static inline struct dwc3_request *next_request(struct list_head *list)
|
||||
static inline void dwc3_gadget_move_queued_request(struct dwc3_request *req)
|
||||
{
|
||||
struct dwc3_ep *dep = req->dep;
|
||||
struct dwc3_trb *trb;
|
||||
u8 tmp = dep->trb_enqueue;
|
||||
|
||||
if (!tmp)
|
||||
tmp = DWC3_TRB_NUM - 1;
|
||||
|
||||
trb = &dep->trb_pool[tmp - 1];
|
||||
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
||||
if (req->trb)
|
||||
req->trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
|
||||
req->status = DWC3_REQUEST_STATUS_QUEUED;
|
||||
list_move_tail(&req->list, &dep->pending_list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user