From: Felipe Balbi <balbi@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: Tejas Joglekar <tejas.joglekar@synopsys.com>,
Yang Fei <fei.yang@intel.com>,
Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>,
YongQin Liu <yongqin.liu@linaro.org>,
Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
Thinh Nguyen <thinhn@synopsys.com>,
Linux USB List <linux-usb@vger.kernel.org>
Subject: Re: dwc3 inconsistent gadget connection state?
Date: Sat, 04 Jul 2020 17:38:10 +0300 [thread overview]
Message-ID: <87lfjz73cd.fsf@kernel.org> (raw)
In-Reply-To: <CALAqxLVPOzD6FD9qJRJjTYai_zL_YzpCkPecWyE-KhTmEHNJYA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]
Hi,
John Stultz <john.stultz@linaro.org> writes:
> On Fri, Jul 3, 2020 at 2:54 AM Felipe Balbi <balbi@kernel.org> wrote:
>> John Stultz <john.stultz@linaro.org> writes:
>> > I was curious if you or anyone else had any thoughts on how to debug
>> > this further?
>>
>> Try enabling dwc3 tracepoints and collecting working and failing
>> cases. If I were to guess, I would say there's a small race condition
>> between setting pullup and the transceiver sending the VBUS_VALID signal
>> to dwc3.
>
> Trace logs attached. Let me know if you have any further ideas!
You can see from failure case that we never got a Reset event. This
happens, for instance, when dwc3 doesn't know that VBUS is above
VBUS_VALID threshold (4.4V). When the problem happens, I'm assuming USB
is completely dead, meaning that keeping the cable connected for longer
won't change anything, right?
In that case, could you dump DWC3 registers (there's a debugfs interface
for that)? I'm mostly interested in the PHY registers, both USB2 and
USB3. Check if the PHYs are suspended in the error case.
If they are, try enabling the quirk flags that disable suspend for the
PHYs (check binding documentation). If that helps, then discuss with
your Silicon Validation guys what are the requirements when it comes to
suspend. Some PHYs are inherently quirky and need some of the quirky
flags dwc3 provides.
Note that disabling suspend completely is a pretty large hammer that
should only be used if nothing else helps. Some PHYs are happy with a
simple delay of U1/U2/U3 entry but, again, check with your Silicon
Validation folks, likely they have already gone through this during chip
characterization.
cheers
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2020-07-04 14:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 21:44 dwc3 inconsistent gadget connection state? John Stultz
2020-07-03 2:55 ` Jun Li
2020-07-03 3:08 ` John Stultz
2020-07-03 7:46 ` Jun Li
2020-07-03 6:15 ` John Stultz
2020-07-03 7:57 ` Anurag Kumar Vulisha
2020-08-05 5:32 ` John Stultz
2020-07-03 9:54 ` Felipe Balbi
2020-07-04 5:51 ` John Stultz
2020-07-04 14:38 ` Felipe Balbi [this message]
2020-07-07 3:56 ` John Stultz
2020-07-07 10:43 ` Felipe Balbi
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=87lfjz73cd.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=andrzej.p@collabora.com \
--cc=anurag.kumar.vulisha@xilinx.com \
--cc=fei.yang@intel.com \
--cc=john.stultz@linaro.org \
--cc=linux-usb@vger.kernel.org \
--cc=tejas.joglekar@synopsys.com \
--cc=thinhn@synopsys.com \
--cc=yongqin.liu@linaro.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;
as well as URLs for NNTP newsgroup(s).