Skip to content

Commit 18ffa98

Browse files
Wesley Chenggregkh
authored andcommitted
usb: dwc3: gadget: Return success always for kick transfer in ep queue
If an error is received when issuing a start or update transfer command, the error handler will stop all active requests (including the current USB request), and call dwc3_gadget_giveback() to notify function drivers of the requests which have been stopped. Avoid returning an error for kick transfer during EP queue, to remove duplicate cleanup operations on the request being queued. Fixes: 8d99087 ("usb: dwc3: gadget: Properly handle failed kick_transfer") cc: stable@vger.kernel.org Signed-off-by: Wesley Cheng <wcheng@codeaurora.org> Link: https://lore.kernel.org/r/1620410119-24971-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bb9c74a commit 18ffa98

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/usb/dwc3/gadget.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
16841684
}
16851685
}
16861686

1687-
return __dwc3_gadget_kick_transfer(dep);
1687+
__dwc3_gadget_kick_transfer(dep);
1688+
1689+
return 0;
16881690
}
16891691

16901692
static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,

0 commit comments

Comments
 (0)