All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>, John Youn <John.Youn@synopsys.com>
Cc: "nsekhar\@ti.com" <nsekhar@ti.com>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Shankar\, Abhishek" <a.shankar@ti.com>, "B\,
	Ravi" <ravibabu@ti.com>
Subject: Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()
Date: Mon, 11 Apr 2016 15:51:38 +0300	[thread overview]
Message-ID: <8737qsnw9x.fsf@intel.com> (raw)
In-Reply-To: <570B9A84.1020607@ti.com>

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


Hi,

Roger Quadros <rogerq@ti.com> writes:

<snip>

>> I don't have this text anywhere so I don't know. Is this something TI
>> came up with or Synopsys ? Unless I can see a document (preferrably from
>> Synopsys) stating this, I can't really accept $subject.
>
> OK. I'll try to find out if there is an official document about this.
>
>> 
>> Another question is: if all it takes is an extra SoftReset, why don't we
>> just reset it during probe() if max_speed < SUPER and we're running on
>> rev < 2.20a ? BTW, which revision of the IP is on AM57x/DRA7x ?
>
> The issue might happen on any Run/Stop transition so not sure if doing it
> SoftReset just at probe fixes anything.
>
> On DRA7x it is rev 2.02a.

oh, same block as OMAP5 ES2.0 :-(

>>>> question is, then: How are you sure that resetting the device actually
>>>> solves the issue ? Did you really hit the metastability problem and
>>>> noted that it works after a soft-reset ? How did you verify that
>>>
>>> I don't know if it solves the issue or not. It was suggested by
>>> Synopsis to TI's silicon team.
>> 
>> now that's a bummer ;-)
>> 
>>> I never hit the metastability problem detection condition in my
>>> overnight tests (i.e. LTDB_LINK_STATE != 4).
>> 
>> overnight is not enough. You need to keep this running for weeks.
>
> how many weeks is acceptable for you? I can run for that long, no problem.
> And what if the issue doesn't happen in that time frame, would you still
> consider this case?

Well, there's always the possibility we have never triggered the issue
to start with :-) What happens if you remove the the current workaround,
set maximum-speed to high-speed and constantly toggle run/stop bit
(there's a soft-connect file under the UDC's directory in sysfs). Can
you ever cause the problems ?

>>>> Run/Stop was in a metastable state, considering that Run/Stop signal is
>>>> not visible outside the die ?
>>>
>>> LTDB_LINK_STATE != 4 within 100ms or RUNSTOP set is the condition to
>>> detect that the issue occurred.
>> 
>> this doesn't prove anything. This just means that your 100ms timer
>> expired. Unless you can verify that Run/Stop is in metastability, you
>> cannot be sure this workaround works.
>> 
>> Did anybody run silicon simulation to verify this case ? It's really the
>> only way to be sure.
>
> AFAIK this wasn't reproducible during silicon simulation either.

now this is a big problem. We just don't know if $subject is really
avoiding the problem ;-) Unless we can trigger the problem, we can't be
sure. We are, however, sure that current workaround avoids the problem
completely.

>>>> It seems to me that resetting the IP is just as "dangerous" as setting
>>>> the IP to High-speed in the first place. No ?
>>>
>>> The soft-reset is just a recovery mechanism if that error is ever hit.
>> 
>> but you don't know if that's a *proper* recovery mechanism because you
>> never even *hit* the error.
>> 
>>> Putting the controller in reset state means it is in a known
>>> state. Why do you say it would be dangerous?
>> 
>> Because you can't predict the systems' behavior. If the flip-flop didn't
>> have time to settle into 0 or 1 state, you don't know what the
>> combinatorial part of the IP will do with that bogus value. It's truly
>> unpredictable. You also cannot know, for sure, that a SoftReset will be
>> enough to bring that flip-flop out of metastability.
>
> I'm not an expert in this area and can only follow the advice the
> Silicon team gives.

fair enough. But you must understand we can't just accept anything even
if we never trigger we problems. Unless we're certain about the fix,
without a shadow of a doubt, we might be creating a very, very hard to
debug regression which might end up with sales drop and what not. It's
the kinda thing that we all must be concerned about ;-)

>>> The original workaround i.e. setting the High-speed instance to
>>> Super-speed to avoid this errata is causing another side
>>> effect. i.e. erratic interrupts happen and more than 2 seconds delay
>> 
>> this should have been an expected side-effect when you design a
>> SuperSpeed controller without a SuperSpeed PHY and don't properly
>> terminate inputs. What you have is a floating PIPE3 interface not
>> properly terminated and capturing random noise (basically acting as a
>> very poor antenna inside your die). Of course the IP will go bonkers and
>> give you "erratic error" interrupts. It has no idea what the hell this
>> "PHY" on the PIPE3 interface is doing.
>
> We know that. The damage is already done. :)

right, and I'm trying to avoid further damage caused by a fix that
hasn't been properly validated :)

>>> to enumerations. This problem is more serious and so we have to keep
>>> the controller in High-speed and tackle the meta-stability condition
>>> if it happens.
>> 
>> you have to tackle the meta-stability, sure, but we need guarantee that
>> $subject IS indeed tackling that problem. Unless there's proof that this
>> really solves the meta-stability issue, I won't take $subject. Sorry
>> dude, but I don't want regressions elsewhere because of a badly
>> validated patch.
>
> I understand. I will see if someone from TI can provide me official
> documentation about the workaround.

thank you

-- 
balbi

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

  reply	other threads:[~2016-04-11 12:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 13:05 [PATCH 0/2] usb: dwc3: gadget: Fix erratic interrupts and delayed enumeration Roger Quadros
2016-03-16 13:05 ` [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit() Roger Quadros
2016-03-16 13:12   ` Felipe Balbi
2016-03-16 13:55     ` Felipe Balbi
2016-03-18 19:17       ` John Youn
2016-03-21  7:14         ` Felipe Balbi
2016-03-21 18:39         ` John Youn
2016-03-22  6:39           ` Felipe Balbi
2016-03-24  0:40             ` John Youn
2016-03-24  6:51               ` Felipe Balbi
2016-03-30 18:44                 ` John Youn
2016-03-31 14:02                   ` Roger Quadros
2016-03-31 14:26                     ` Felipe Balbi
2016-04-04  7:50                       ` Roger Quadros
2016-04-04  8:10                         ` Felipe Balbi
2016-04-04 20:35                           ` Shankar, Abhishek
2016-04-11 12:37                           ` Roger Quadros
2016-04-11 12:51                             ` Felipe Balbi [this message]
2016-04-11 12:58                               ` Roger Quadros
2016-04-11 13:28                                 ` Felipe Balbi
2016-03-16 13:05 ` [PATCH 2/2] usb: dwc3: gadget: usb: dwc3: run/stop metastability workaround Roger Quadros
2016-03-16 13:14   ` Felipe Balbi
2016-03-16 13:27     ` Roger Quadros
2016-03-16 13:08 ` [PATCH 0/2] usb: dwc3: gadget: Fix erratic interrupts and delayed enumeration 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=8737qsnw9x.fsf@intel.com \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=a.shankar@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=ravibabu@ti.com \
    --cc=rogerq@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.