Skip to contentSkip to conversation

usb: dwc3: gadget: Return success always for kick transfer in ep queue

PATCH Superseded Wesley Cheng 2 participants 3 messages May 7, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
Changes in v1:
- Renamed commit title due to new implementation
- Return success always for kick transfer during ep queue

Previous patchset:
https://lore.kernel.org/linux-usb/[email protected]/T/#t

 drivers/usb/dwc3/gadget.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/dwc3/gadget.c +3 -1
index dd80e5c..a5b7fd9 100644
@@ -1684,7 +1684,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
 		}
 	}
 
-	return __dwc3_gadget_kick_transfer(dep);
+	__dwc3_gadget_kick_transfer(dep);
+
+	return 0;
 }
 
 static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 8 lines · Wesley Cheng

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.

do you want to add a Fixes here? :-)

We should probably Cc stable too.

Signature · 1 line
balbi
#2 lore raw
Quoted 10 lines · Felipe Balbi
Quoted 8 lines · Wesley Cheng

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.

Hi Felipe,

Quoted 3 lines

do you want to add a Fixes here? :-)

Sure, will do!

Quoted 2 lines

We should probably Cc stable too.

Got it.

Thanks
Wesley Cheng

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project