mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
usb: dwc3: gadget: fix bug of clac_trbs_left at isoc in transfer
This patch clear the HWO bit in trb_ctrl by software when requests are moved to queued list. There are some cases which can lead to missed isoc event in dwc3 endpoint interrupt. For example, in uac+uvc mode, if PC start to playpack audio or open uvc preview while captureing audio, a lot of control transfer will bring missed isoc event and we will unmap all request in started list and move them to queued list. Without this patch, the number of trbs left will be incorrectle calculated as 0 and no trbs will be prepared at next transfer. Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com> Change-Id: Idca5cd10f291962a480fc7e01e2186beaae2efb9
This commit is contained in:
@@ -74,7 +74,14 @@ 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;
|
||||
req->status = DWC3_REQUEST_STATUS_QUEUED;
|
||||
list_move_tail(&req->list, &dep->pending_list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user