From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: dwc3 gadget breaks on system suspend/resume
Date: Fri, 27 Jan 2017 17:25:36 +0200 [thread overview]
Message-ID: <d8e3bbf8-f053-e842-ea2c-c2463cc06f43@ti.com> (raw)
In-Reply-To: <8760l07dfh.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On 27/01/17 17:03, Felipe Balbi wrote:
>
> Hi,
>
> Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> writes:
>>>>>>> We have system suspend resume working on dra7-evm in v4.10-rc but
>>>>>>> dwc3 gadget breaks after system suspend resume.
>>>>>>>
>>>>>>> Any hints how to fix it? Full backtrace below.
>>>>>>
>>>>>> from a quick look. END_TRANSFER is timing out, most likely. Tracepoints
>>>>>> should give better hints.
>>>>>>
>>>>>> We might have a bug in dwc3_gadget_suspend(). No idea what's really
>>>>>> going on.
>>>>>>
>>>>>>> Another message that looks worry-some is
>>>>>>> "[ 61.495313] omap-dwc3 48880000.omap_dwc3_1: runtime PM trying to suspend device but active child"
>>>>>>
>>>>>> did you implement runtime PM on dwc3-omap.c? Look at dwc3-pci.c for reference.
>>>>>>
>>>>>>> If I unload gadget, then suspend/resume system then load gadget everything works fine.
>>>>>>
>>>>>> right, dwc3 UDC will already have been toredown. Unfortunately I can't
>>>>>> spend a lot of time on this, so you're gonna have to try to fix it and
>>>>>> provide a patch :-s Quite busy looking at some f_fs weirdness.
>>>>>
>>>>> No problem. I'll debug this issue.
>>>>
>>>> Bisected to bad commit 4eb3d981e7344ded9e5a8725ed934dd8f8056daf "usb: dwc3: core: simplify suspend/resume operations".
>>>
>>> $ git show 4eb3d981e7344ded9e5a8725ed934dd8f8056daf
>>> fatal: bad object 4eb3d981e7344ded9e5a8725ed934dd8f8056daf
>>>
>>> That commit to me is:
>>>
>>> commit 51f5d49ad6f011ee380b866ea617fd90584189a2
>>> Author: Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>> Date: Mon May 16 10:52:58 2016 +0300
>>>
>>> usb: dwc3: core: simplify suspend/resume operations
>>>
>>> now that we have re-factored dwc3_core_init() and
>>> dwc3_core_exit() we can use them for suspend/resume
>>> operations.
>>>
>>> This will help us avoid some common mistakes when
>>> patching code when we have duplicated pieces of code
>>> doing the same thing.
>>>
>>> Signed-off-by: Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>>>
>>> Can you please try actual mainline and not some tree where you
>>> cherry-picked patches on top? ;-)
>>>
>> Sorry about the wrong commit ID.
>
> np
>
>> I reset my tree to 51f5d49ad6f011ee380b866ea617fd90584189a2 and can reproduce the issue.
>
> okay
>
>> The previous commit c499ff71ff2a281366c6ec7a904c547d806cbcd1 is fine.
>
> okay. Then let's try to figure out what's going on. A diff of regdump
> before and after suspend/resume might start to give some clue about
> what's going on. DWC3 tracepoints should help too. Care to get those?
> BTW, is this dwc3 as host or peripheral?
>
It is for peripheral mode.
regdump pre-suspend
http://pastebin.ubuntu.com/23875213/
regdump post-resume
http://pastebin.ubuntu.com/23875211/
tracing during suspend/resume. NOTE: gadget zero had enumerated successfully
before I enabled the tracing.
http://pastebin.ubuntu.com/23875233/
cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-01-27 15:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 11:46 dwc3 gadget breaks on system suspend/resume Roger Quadros
[not found] ` <54bdc1b7-69ed-d580-fd17-3e7499ac1c27-l0cyMroinI0@public.gmane.org>
2017-01-19 11:59 ` Felipe Balbi
[not found] ` <87a8anjm5z.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-19 12:16 ` Roger Quadros
[not found] ` <a0cc2705-b1f5-7b6e-d73c-ff9b525eead2-l0cyMroinI0@public.gmane.org>
2017-01-27 13:55 ` Roger Quadros
[not found] ` <e64bc4ee-1c71-d72c-cdc7-f5857f49a90e-l0cyMroinI0@public.gmane.org>
2017-01-27 14:17 ` Felipe Balbi
[not found] ` <87inp07fkx.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-27 14:46 ` Roger Quadros
[not found] ` <57fbf2b6-3811-3202-0e69-7cf82662d50f-l0cyMroinI0@public.gmane.org>
2017-01-27 15:03 ` Felipe Balbi
[not found] ` <8760l07dfh.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-27 15:25 ` Roger Quadros [this message]
2017-01-27 15:47 ` Felipe Balbi
[not found] ` <87wpdg5wtx.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-30 12:46 ` Roger Quadros
[not found] ` <a91c7564-5bfa-c77f-8fa2-1c1b0bcfd815-l0cyMroinI0@public.gmane.org>
2017-01-30 12:59 ` Felipe Balbi
[not found] ` <87o9yo66w7.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-30 13:03 ` Roger Quadros
[not found] ` <19de4c77-0e95-f7b5-0f56-a705134fd4cc-l0cyMroinI0@public.gmane.org>
2017-01-30 13:16 ` Felipe Balbi
[not found] ` <87inow662n.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-30 13:47 ` Felipe Balbi
[not found] ` <87d1f464mp.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-31 11:38 ` Roger Quadros
[not found] ` <90f70eb2-8b87-d33e-71cd-335c05c6f65a-l0cyMroinI0@public.gmane.org>
2017-01-31 12:03 ` Felipe Balbi
[not found] ` <87mve74esx.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-31 13:25 ` Roger Quadros
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=d8e3bbf8-f053-e842-ea2c-c2463cc06f43@ti.com \
--to=rogerq-l0cymroini0@public.gmane.org \
--cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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
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