All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: gadget: Return success always for kick transfer in ep queue
@ 2021-05-07  6:34 Wesley Cheng
  2021-05-07 12:34 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Wesley Cheng @ 2021-05-07  6:34 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, Thinh.Nguyen, jackp, 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.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
---
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/875yzxibur.fsf@kernel.org/T/#t

 drivers/usb/dwc3/gadget.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index dd80e5c..a5b7fd9 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -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,
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Return success always for kick transfer in ep queue
  2021-05-07  6:34 [PATCH] usb: dwc3: gadget: Return success always for kick transfer in ep queue Wesley Cheng
@ 2021-05-07 12:34 ` Felipe Balbi
  2021-05-07 17:38   ` Wesley Cheng
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2021-05-07 12:34 UTC (permalink / raw)
  To: Wesley Cheng, gregkh
  Cc: linux-usb, linux-kernel, Thinh.Nguyen, jackp, Wesley Cheng

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

Wesley Cheng <wcheng@codeaurora.org> writes:

> 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.
>
> Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>

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

We should probably Cc stable too.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: dwc3: gadget: Return success always for kick transfer in ep queue
  2021-05-07 12:34 ` Felipe Balbi
@ 2021-05-07 17:38   ` Wesley Cheng
  0 siblings, 0 replies; 3+ messages in thread
From: Wesley Cheng @ 2021-05-07 17:38 UTC (permalink / raw)
  To: Felipe Balbi, gregkh; +Cc: linux-usb, linux-kernel, Thinh.Nguyen, jackp



On 5/7/2021 5:34 AM, Felipe Balbi wrote:
> Wesley Cheng <wcheng@codeaurora.org> writes:
> 
>> 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.
>>
>> Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>

Hi Felipe,
> 
> do you want to add a Fixes here? :-)
> 
Sure, will do!

> We should probably Cc stable too.
> 
Got it.

Thanks
Wesley Cheng

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-07 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  6:34 [PATCH] usb: dwc3: gadget: Return success always for kick transfer in ep queue Wesley Cheng
2021-05-07 12:34 ` Felipe Balbi
2021-05-07 17:38   ` Wesley Cheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.