From: John Keeping <john@metanate.com>
To: Minas Harutyunyan <minas.harutyunyan@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arthur.petrosyan@synopsys.com" <arthur.petrosyan@synopsys.com>
Subject: usb: dwc2: gadget: fix ISOC frame overflow handling
Date: Tue, 18 Dec 2018 14:35:04 +0000 [thread overview]
Message-ID: <20181218143504.027fc53c@donbot> (raw)
Hi Minas,
On Fri, 14 Dec 2018 09:00:08 +0000
Minas Harutyunyan <minas.harutyunyan@synopsys.com> wrote:
> First of all, sorry for delayed answer.
> Looks like similar issue seen by Andrzej Pietrasiewicz
> <andrzej.p@samsung.com>: "dwc2 isochronous transfers issues". Same
> feedback provided to Andrzej.
>
> I run tests on 4.20.0-rc4 in DDMA. By default IN ISOC traffic failed
> because of BNA interrupts. It's happen because UAC2 requests count
> set by default to 2. Our core and driver can't work in DDMA with
> descriptor list length equal to 2. It's not possible on time prepare
> next descriptors to avoid BNA interrupt.
>
> By changing UAC2_DEF_REQ_NUM to 4 all audio gadget tests passed
> smoothly. Could you please apply this patch and run tests in DDMA
> mode:
>
> diff --git a/drivers/usb/gadget/function/u_uac2.h
> b/drivers/usb/gadget/function/u_uac2.h
> index 8362ee572e1e..5e649259ab76 100644
> --- a/drivers/usb/gadget/function/u_uac2.h
> +++ b/drivers/usb/gadget/function/u_uac2.h
> @@ -21,7 +21,7 @@
> #define UAC2_DEF_CCHMASK 0x3
> #define UAC2_DEF_CSRATE 64000
> #define UAC2_DEF_CSSIZE 2
> -#define UAC2_DEF_REQ_NUM 2
> +#define UAC2_DEF_REQ_NUM 4
>
> struct f_uac2_opts {
> struct usb_function_instance func_inst;
>
>
> If it will OK on your side also then will switch to BDMA mode and
> debug.
With DDMA enabled, I see the following error after the stream has been
running for a while (anything from a few seconds to a few minutes):
-- >8 --
[ 1798.836322] dwc2 ff580000.usb: dwc2_hsotg_ep_disable: called for ep0
[ 1798.836329] dwc2 ff580000.usb: dwc2_hsotg_ep_disable: called for ep0
[ 1798.851092] dwc2 ff580000.usb: new device is high-speed
[ 1798.924461] dwc2 ff580000.usb: new device is high-speed
[ 1798.982887] dwc2 ff580000.usb: new address 25
[ 1799.002463] configfs-gadget gadget: high-speed config #1: config
-- 8< --
On the host side (Linux 4.18.16 Intel xHCI), I see this logged at the
same time:
-- >8 --
[1735740.716242] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71
[1735740.716990] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71
[1735740.717906] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71
[1735740.718905] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71
[1735740.719916] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71
[1735740.720032] usb 1-2.2-port7: disabled by hub (EMI?), re-enabling...
[1735740.720036] usb 1-2.2.7: USB disconnect, device number 28
[1735740.937500] usb 1-2.2.7: new high-speed USB device number 29 using xhci_hcd
-- 8< --
The device does then enumerate and works for a period of time before the
same error happens again.
Regards,
John
next reply other threads:[~2018-12-18 14:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 14:35 John Keeping [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-24 7:18 usb: dwc2: gadget: fix ISOC frame overflow handling Minas Harutyunyan
2018-12-21 16:05 John Keeping
2018-12-19 14:09 Minas Harutyunyan
2018-12-14 9:00 Minas Harutyunyan
2018-11-12 22:46 John Keeping
2018-11-12 8:53 Minas Harutyunyan
2018-11-09 18:42 John Keeping
2018-11-09 14:36 Minas Harutyunyan
2018-11-09 8:43 Minas Harutyunyan
2018-11-08 17:36 John Keeping
2018-11-05 8:28 Minas Harutyunyan
2018-10-23 13:43 John Keeping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218143504.027fc53c@donbot \
--to=john@metanate.com \
--cc=arthur.petrosyan@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=minas.harutyunyan@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).