Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Ferry Toth <fntoth@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Jack Pham <jackp@codeaurora.org>
Subject: Re: BUG with linux 5.9.0 with dwc3 in gadget mode
Date: Fri, 06 Nov 2020 16:15:59 +0200
Message-ID: <87blgar2ow.fsf@kernel.org> (raw)
In-Reply-To: <326aa23e-fabd-f3d6-4778-d036858413a2@gmail.com>


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


Hi,

Ferry Toth <fntoth@gmail.com> writes:
>>>> Ferry Toth <fntoth@gmail.com> writes:
>>>>> Op 27-10-2020 om 22:16 schreef Andy Shevchenko:
>>>>>> On Tue, Oct 27, 2020 at 10:13 PM Ferry Toth <fntoth@gmail.com> wrote:
>>>>>>> Op 22-10-2020 om 15:43 schreef Andy Shevchenko:
>>>>>>>> On Thu, Oct 22, 2020 at 4:21 PM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
>>>>>>>>> Ferry Toth wrote:
>>>>>> ...
>>>>>>
>>>>>>>>> There are some fixes to dwc3 in kernel mainline. Is it possible to test
>>>>>>>>> this against linux-next?
>>>>>>>> I think the best is to wait for v5.10-rc1 and retest.
>>>>>> Can you give a try of v5.10-rc1?
>>>>> Yes, I just tried:
>>>>>
>>>>> I booted in host mode, then flip the switch. Gadget come up, go down
>>>>> once, then come up again and stay up.
>>>> please collect trace events. It's important to figure out why it's going
>>>> down, even if only once. Make sure to collect trace *and* dmesg so we
>>>> can correlate trace with the reenumeration that should show up in dmesg.
>>>>
>>>> thanks
>>> Sorry, I had to replace mobo. Now back on this.
>>>
>>> As is, on Edison I can record with something like "perf record -e
>>> 'dwc3:dwc3_gadget*' -e 'gadget:*' -g -a".
>>> Then get the trace buffer with "perf script > gadget.txt". Then at each
>>> trace point we get a stack trace like:
>>>
>>> file-storage   831 [001]  4445.240038: dwc3:dwc3_gadget_ep_cmd: [FAILED
>>> TO PARSE] name=ep4in cmd=524295 param0=0 param1=0 param2=0 cmd_status=0
>>>       ffffffff9a35b7e7 __traceiter_dwc3_gadget_ep_cmd+0x37
>>> ([kernel.kallsyms])
>>>       ffffffff9a35b7e7 __traceiter_dwc3_gadget_ep_cmd+0x37
>>> ([kernel.kallsyms])
>>>       ffffffff9a35fa40 dwc3_send_gadget_ep_cmd+0x320 ([kernel.kallsyms])
>>>       ffffffff9a3606d0 __dwc3_gadget_kick_transfer+0x200 ([kernel.kallsyms])
>>>       ffffffff9a361114 dwc3_gadget_ep_queue+0xe4 ([kernel.kallsyms])
>>>       ffffffff9a3afc3a usb_ep_queue+0x2a ([kernel.kallsyms])
>>>       ffffffffc047c301 start_transfer.isra.0+0x21 ([kernel.kallsyms])
>>>       ffffffffc047c88a start_in_transfer.isra.0+0x3a ([kernel.kallsyms])
>>>       ffffffffc047c93d send_status+0x8d ([kernel.kallsyms])
>>>       ffffffffc047dd05 fsg_main_thread+0x3c5 ([kernel.kallsyms])
>>>       ffffffff99c853b9 kthread+0xf9 ([kernel.kallsyms])
>>>       ffffffff99c01a32 ret_from_fork+0x22 ([kernel.kallsyms])
>>>
>>> "perf list" shows the tracepoint events, the same as under
>>> /sys/kernel/debug/tracing/events/
>>>
>>> Question is which points to trace (above command fills buffer to 35MB in
>>> 10sec). Do you have suggestions?
>> don't enable any gadget event. Only dwc3 events. Also, enable *all* dwc3
>> events. Usually, I avoid perf when doing this and just go straight to
>> /sys/kernel/trace/.
> Ok, I can do that. But I'm not sure how I turn on tracing and capture 
> the results.

Got you covered ;-)

https://www.kernel.org/doc/html/latest/driver-api/usb/dwc3.html#reporting-bugs


-- 
balbi

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

  parent reply index

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 20:21 Ferry Toth
2020-10-19  5:45 ` Felipe Balbi
2020-10-19  7:14   ` Ferry Toth
2020-10-19 18:49     ` Ferry Toth
2020-10-20 12:35       ` Felipe Balbi
2020-10-20 21:01         ` Ferry Toth
2020-10-19  7:18   ` Ferry Toth
2020-10-20 12:32     ` Felipe Balbi
2020-10-20 19:46       ` Ferry Toth
2020-10-20 20:37       ` Ferry Toth
2020-10-20 22:10         ` Thinh Nguyen
2020-10-20 22:58           ` Thinh Nguyen
2020-10-21  1:47             ` Jack Pham
2020-10-21  1:56               ` Thinh Nguyen
2020-10-21 20:01                 ` Ferry Toth
2020-10-22  9:23               ` Andy Shevchenko
2020-10-21 19:45             ` Ferry Toth
2020-10-21 19:50               ` Thinh Nguyen
2020-10-21 20:42                 ` Ferry Toth
2020-10-21 23:32                   ` Thinh Nguyen
2020-10-22 13:43                     ` Andy Shevchenko
2020-10-27 20:13                       ` Ferry Toth
2020-10-27 21:06                         ` Jack Pham
2020-10-27 22:07                           ` Ferry Toth
2020-10-27 21:16                         ` Andy Shevchenko
2020-10-27 21:54                           ` Ferry Toth
2020-10-28  9:18                             ` Felipe Balbi
2020-11-05 21:29                               ` Ferry Toth
2020-11-06  6:38                                 ` Felipe Balbi
2020-11-06  8:14                                   ` Ferry Toth
     [not found]                                   ` <326aa23e-fabd-f3d6-4778-d036858413a2@gmail.com>
2020-11-06 14:15                                     ` Felipe Balbi [this message]
     [not found]                                       ` <e21a5a77-9017-4cbe-a228-85357d660da5@gmail.com>
2020-11-07  8:01                                         ` Felipe Balbi
2020-11-07 13:37                                           ` Ferry Toth
2020-11-09  7:00                                             ` Felipe Balbi
2020-10-27 21:19                         ` Andy Shevchenko
2020-10-19 19:46   ` Andy Shevchenko
2020-10-19 20:46     ` Ferry Toth
2020-10-20 13:27     ` Andy Shevchenko

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=87blgar2ow.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=fntoth@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jackp@codeaurora.org \
    --cc=linux-usb@vger.kernel.org \
    /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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git