Skip to content

Commit 12f4132

Browse files
committed
Merge tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fix from Greg KH: "A single revert of a commit that caused problems in 5.14-rc5 for 5.14-rc6. It has been in linux-next almost all week, and has resolved the issues that were reported on lots of different systems that were not the platform that the change was originally tested on (gotta love SoC cores used in multiple devices from multiple vendors...)" * tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "usb: dwc3: gadget: Use list_replace_init() before traversing lists"
2 parents 56aee57 + 664cc97 commit 12f4132

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

drivers/usb/dwc3/gadget.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,13 +1741,9 @@ static void dwc3_gadget_ep_cleanup_cancelled_requests(struct dwc3_ep *dep)
17411741
{
17421742
struct dwc3_request *req;
17431743
struct dwc3_request *tmp;
1744-
struct list_head local;
17451744
struct dwc3 *dwc = dep->dwc;
17461745

1747-
restart:
1748-
list_replace_init(&dep->cancelled_list, &local);
1749-
1750-
list_for_each_entry_safe(req, tmp, &local, list) {
1746+
list_for_each_entry_safe(req, tmp, &dep->cancelled_list, list) {
17511747
dwc3_gadget_ep_skip_trbs(dep, req);
17521748
switch (req->status) {
17531749
case DWC3_REQUEST_STATUS_DISCONNECTED:
@@ -1765,9 +1761,6 @@ static void dwc3_gadget_ep_cleanup_cancelled_requests(struct dwc3_ep *dep)
17651761
break;
17661762
}
17671763
}
1768-
1769-
if (!list_empty(&dep->cancelled_list))
1770-
goto restart;
17711764
}
17721765

17731766
static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
@@ -2976,22 +2969,15 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
29762969
{
29772970
struct dwc3_request *req;
29782971
struct dwc3_request *tmp;
2979-
struct list_head local;
29802972

2981-
restart:
2982-
list_replace_init(&dep->started_list, &local);
2983-
2984-
list_for_each_entry_safe(req, tmp, &local, list) {
2973+
list_for_each_entry_safe(req, tmp, &dep->started_list, list) {
29852974
int ret;
29862975

29872976
ret = dwc3_gadget_ep_cleanup_completed_request(dep, event,
29882977
req, status);
29892978
if (ret)
29902979
break;
29912980
}
2992-
2993-
if (!list_empty(&dep->started_list))
2994-
goto restart;
29952981
}
29962982

29972983
static bool dwc3_gadget_ep_should_continue(struct dwc3_ep *dep)

0 commit comments

Comments
 (0)