linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
  2019-01-21 10:02 [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint Zeng Tao
@ 2019-01-21  8:16 ` Felipe Balbi
  2019-01-21  8:51   ` Zengtao (B)
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2019-01-21  8:16 UTC (permalink / raw)
  To: Zeng Tao; +Cc: Zeng Tao, Greg Kroah-Hartman, linux-usb, linux-kernel

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


Hi,

Zeng Tao <prime.zeng@hisilicon.com> writes:
> For ISOC transfers, if there is no available data for a period, we need
> to stop the transfer by issue a stop command, otherwise, all the
> upcoming transfers will started by update transfer command, and will be
> dropped with MISS ISOC errors.

We, actually, have code to handle missed isoc errors now. Have you
tested with that applied? Which kernel are you using? Can you share
tracepoints captured with v5.0-rc3?

-- 
balbi

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

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

* RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
  2019-01-21  8:16 ` Felipe Balbi
@ 2019-01-21  8:51   ` Zengtao (B)
  2019-01-21  8:55     ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Zengtao (B) @ 2019-01-21  8:51 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Hi balbi:

>-----Original Message-----
>From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com]
>Sent: Monday, January 21, 2019 4:17 PM
>To: Zengtao (B) <prime.zeng@hisilicon.com>
>Cc: Zengtao (B) <prime.zeng@hisilicon.com>; Greg Kroah-Hartman
><gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
>linux-kernel@vger.kernel.org
>Subject: Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC
>endpoint
>
>* PGP Signed by an unknown key
>
>
>Hi,
>
>Zeng Tao <prime.zeng@hisilicon.com> writes:
>> For ISOC transfers, if there is no available data for a period, we
>> need to stop the transfer by issue a stop command, otherwise, all the
>> upcoming transfers will started by update transfer command, and will
>> be dropped with MISS ISOC errors.
>
>We, actually, have code to handle missed isoc errors now. Have you tested
>with that applied? Which kernel are you using? Can you share tracepoints
>captured with v5.0-rc3?
>

Not v5.0-rc3, but I tested it based on 4.9 with backported dwc3 driver. And with
UVC application, it's very easy to reproduce it.

>--
>balbi
>
>* Unknown Key
>* 0xE11A9906

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

* RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
  2019-01-21  8:51   ` Zengtao (B)
@ 2019-01-21  8:55     ` Felipe Balbi
  2019-02-23  9:26       ` Zengtao (B)
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2019-01-21  8:55 UTC (permalink / raw)
  To: Zengtao (B); +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Laurent Pinchart

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


Hi,

"Zengtao (B)" <prime.zeng@hisilicon.com> writes:
>>-----Original Message-----
>>From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com]
>>Sent: Monday, January 21, 2019 4:17 PM
>>To: Zengtao (B) <prime.zeng@hisilicon.com>
>>Cc: Zengtao (B) <prime.zeng@hisilicon.com>; Greg Kroah-Hartman
>><gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
>>linux-kernel@vger.kernel.org
>>Subject: Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC
>>endpoint
>>
>>* PGP Signed by an unknown key
>>
>>
>>Hi,
>>
>>Zeng Tao <prime.zeng@hisilicon.com> writes:
>>> For ISOC transfers, if there is no available data for a period, we
>>> need to stop the transfer by issue a stop command, otherwise, all the
>>> upcoming transfers will started by update transfer command, and will
>>> be dropped with MISS ISOC errors.
>>
>>We, actually, have code to handle missed isoc errors now. Have you tested
>>with that applied? Which kernel are you using? Can you share tracepoints
>>captured with v5.0-rc3?
>>
>
> Not v5.0-rc3, but I tested it based on 4.9 with backported dwc3 driver. And with
> UVC application, it's very easy to reproduce it.

Ok, so it could be that you missed patches while backporting, right? How
can I reproduce this? What do I need? Care to give detailed
instructions?

-- 
balbi

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

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

* [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
@ 2019-01-21 10:02 Zeng Tao
  2019-01-21  8:16 ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Zeng Tao @ 2019-01-21 10:02 UTC (permalink / raw)
  To: felipe.balbi
  Cc: Zeng Tao, Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel

For ISOC transfers, if there is no available data for a period, we need
to stop the transfer by issue a stop command, otherwise, all the
upcoming transfers will started by update transfer command, and will be
dropped with MISS ISOC errors.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 drivers/usb/dwc3/gadget.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e18c2a2..58e71ba 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2500,6 +2500,10 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
 			stop = true;
 	}
 
+	if (list_empty(&dep->started_list) &&
+	    (usb_endpoint_xfer_isoc(dep->endpoint.desc)))
+		stop = true;
+
 	dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
 
 	if (stop) {
-- 
2.7.4


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

* RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
  2019-01-21  8:55     ` Felipe Balbi
@ 2019-02-23  9:26       ` Zengtao (B)
  2019-04-25 13:03         ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Zengtao (B) @ 2019-02-23  9:26 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Laurent Pinchart

Hi balbi:

I got this issue in the UVC application, and I think this issue still exist in the 
latest dwc3 driver.

And we should issue an stop command and the queue is empty when it's 
ISOC transfer, otherwise we will end up with MISS ISOC error for all the 
upcoming transfers.

So I think you can test the UVC application with the latest driver.

Regards
Zengtao 

>-----Original Message-----
>From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com]
>Sent: Monday, January 21, 2019 4:56 PM
>To: Zengtao (B) <prime.zeng@hisilicon.com>
>Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>;
>linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Laurent
>Pinchart <laurent.pinchart@ideasonboard.com>
>Subject: RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC
>endpoint
>
>* PGP Signed by an unknown key
>
>
>Hi,
>
>"Zengtao (B)" <prime.zeng@hisilicon.com> writes:
>>>-----Original Message-----
>>>From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com]
>>>Sent: Monday, January 21, 2019 4:17 PM
>>>To: Zengtao (B) <prime.zeng@hisilicon.com>
>>>Cc: Zengtao (B) <prime.zeng@hisilicon.com>; Greg Kroah-Hartman
>>><gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
>>>linux-kernel@vger.kernel.org
>>>Subject: Re: [PATCH] usb: dwc3: gadget: issue a stop command for
>ISOC
>>>endpoint
>>>
>>>> Old Signed by an unknown key
>>>
>>>
>>>Hi,
>>>
>>>Zeng Tao <prime.zeng@hisilicon.com> writes:
>>>> For ISOC transfers, if there is no available data for a period, we
>>>> need to stop the transfer by issue a stop command, otherwise, all
>>>> the upcoming transfers will started by update transfer command,
>and
>>>> will be dropped with MISS ISOC errors.
>>>
>>>We, actually, have code to handle missed isoc errors now. Have you
>>>tested with that applied? Which kernel are you using? Can you share
>>>tracepoints captured with v5.0-rc3?
>>>
>>
>> Not v5.0-rc3, but I tested it based on 4.9 with backported dwc3
>> driver. And with UVC application, it's very easy to reproduce it.
>
>Ok, so it could be that you missed patches while backporting, right?
>How can I reproduce this? What do I need? Care to give detailed
>instructions?
>
>--
>balbi
>
>* Unknown Key
>* 0xE11A9906

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

* RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint
  2019-02-23  9:26       ` Zengtao (B)
@ 2019-04-25 13:03         ` Felipe Balbi
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2019-04-25 13:03 UTC (permalink / raw)
  To: Zengtao (B); +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Laurent Pinchart

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


(please, avoid top-posting)

Hi,

"Zengtao (B)" <prime.zeng@hisilicon.com> writes:

> Hi balbi:
>
> I got this issue in the UVC application, and I think this issue still exist in the 
> latest dwc3 driver.
>
> And we should issue an stop command and the queue is empty when it's 
> ISOC transfer, otherwise we will end up with MISS ISOC error for all the 
> upcoming transfers.
>
> So I think you can test the UVC application with the latest driver.

right. Then what do I do? How do you load the driver, how do you start
the application? When do you plug the cable?

Please, provide exact steps so I can try to replicate the problem.

-- 
balbi

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

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

end of thread, other threads:[~2019-04-25 13:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 10:02 [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint Zeng Tao
2019-01-21  8:16 ` Felipe Balbi
2019-01-21  8:51   ` Zengtao (B)
2019-01-21  8:55     ` Felipe Balbi
2019-02-23  9:26       ` Zengtao (B)
2019-04-25 13:03         ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).