From: Felipe Balbi <balbi@ti.com>
To: Sneeker Yeh <sneeker.yeh@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Grant Likely <grant.likely@linaro.org>,
Alan Stern <stern@rowland.harvard.edu>,
Arnd Bergmann <arnd@arndb.de>, Paul Bolle <pebolle@tiscali.nl>,
Hans de Goede <hdegoede@redhat.com>,
Thomas Pugliese <thomas.pugliese@gmail.com>,
David Mosberger <davidm@egauge.net>,
Peter Griffin <peter.griffin@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Andrew Bresticker <abrestic@chromium.org>,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb
Subject: Re: [PATCH 3/3] usb: dwc3: add a quirk for device disconnection issue in Synopsis dwc3 core
Date: Mon, 12 Jan 2015 11:20:32 -0600 [thread overview]
Message-ID: <20150112172032.GD6525@saruman> (raw)
In-Reply-To: <CAJ1gpc3RZnqizhiasrwS8uy1H_wQAi_T0mPcS8LAK4FhmBRJ6A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3537 bytes --]
Hi,
On Sun, Jan 11, 2015 at 11:19:55PM +0800, Sneeker Yeh wrote:
> > > > enable the quirk only for you. Isn't there a better way of enabling the
> > > > quirk based off of revision detection couple with a look on GHWPARAMS*
> > > > registers ?
> > > >
> > > > What's tricking me is this claim that only config-free PHYs would be
> > > > affected, why ?
> > > >
> > >
> > > i'm still struggling now to try to get more information about this.
> > > some security policy inside Fujitsu make me unable to access full
> > > information of this errata today.
> > >
> > > Someday after i get enough information,
> > > i shall take your suggestion here that seems better to incur quirk
> > > dynamically via GHWPARAMS,
> > > and then send it here again.
> >
> > ok, hopefully you'll find a way ;-)
> >
> > I got some update information here finally~
> in case i express unclearly i also put a pdf:
> https://drive.google.com/file/d/0B18MmcvvKjNNbDF6eEdHSzZCazA/view
>
> This issue is defined by a two-way race at disconnect, between
> 1) class driver interrupt endpoint resheduling attempts if the ISR gave an
> ep error event due to device detach (it would try 3 times)
> 2) Disconnect interrupt on PORTSC_CSC, which is cleared by hub thread
> asynchronously
> 3) The hardware IP was configured in silicon with
> - DWC_USB3_SUSPEND_ON_DISCONNECT_EN=1 (this is an IP configuration
yeah, aparently this is another configuration which is not exposed on
HWPARAMS registers. Paul, can you confirm for us ? I couldn't find it on
Databook on any of the HWPARAMS registers.
> port whose state cannot be checked from software)
> - Synopsys IP version is < 3.00a
heh, so pretty much everybody :-)
> The IP will auto-suspend itself on device detach with some
> phy-specific interval after CSC is cleared by 2)
>
> If 2) and 3) complete before 1), the interrupts it expects will not be
> generated by the autosuspended IP, leading to a deadlock. Even later
> disconnection procedure would detect that corresponding urb is still
> in-progress and issue a ep stop command, auto-suspended IP still won't
> respond to that command.
>
> this defect would result in this when device detached:
> -------------------
> [ 99.603544] usb 4-1: USB disconnect, device number 2
> [ 104.615254] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop
> endpoint command.
> [ 104.623362] xhci-hcd xhci-hcd.0.auto: Assuming host is dying, halting
> host.
> [ 104.653261] xhci-hcd xhci-hcd.0.auto: Host not halted after 16000
> microseconds.
> [ 104.660584] xhci-hcd xhci-hcd.0.auto: Non-responsive xHCI host is not
> halting.
> [ 104.667817] xhci-hcd xhci-hcd.0.auto: Completing active URBs anyway.
> [ 104.674198] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
> --------------------
> As a result, when device detached, we desired to postpone "PORTCSC clear"
> behind "disable slot". it's found that all executed ep command related to
> disconnetion, are executed before "disable slot".
Now this is all great information and they should all be part of your
commit log and probably a big comment should be added to code as well.
Thanks for going after all these details, now let's figure out a way to
pass dwc3 revision to xhci, or maybe we pass just a flag for the quirk,
something like:
if (dwc->revision < 3.00a && dwc->has_suspend_on_disconnect)
xhci_pdata.delay_portcsc_clear = true;
or something similar to that.
cheers
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-12 17:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 2:10 [PATCH 0/3] Add support for Fujitsu USB host controller Sneeker Yeh
2014-12-16 2:10 ` [PATCH 1/3] usb: host: f_usb20ho: add support for Fujitsu ehci/ohci USB 2.0 " Sneeker Yeh
2014-12-16 9:06 ` Arnd Bergmann
2014-12-17 15:33 ` Sneeker.Yeh
[not found] ` <830AC58E49A426478AC39824BC0FA915D8BB402BB7-BxlyW7DJwtfE0yrG4eIIn8GT06e9YD5CS4/B3AGzWvkvtab9mdV7tw@public.gmane.org>
2014-12-17 15:44 ` Arnd Bergmann
2014-12-17 15:46 ` Sneeker.Yeh
2014-12-16 2:10 ` [PATCH 2/3] usb: dwc3: add Fujitsu Specific Glue layer Sneeker Yeh
[not found] ` <1418695828-605-3-git-send-email-Sneeker.Yeh-l16TxrwUIHTQFUHtdCDX3A@public.gmane.org>
2014-12-22 15:59 ` Felipe Balbi
2014-12-28 17:52 ` Sneeker Yeh
2014-12-29 16:14 ` Felipe Balbi
2015-01-04 13:16 ` Sneeker Yeh
2015-01-05 15:52 ` Felipe Balbi
[not found] ` <CAJ1gpc0uniw3F3O9nxTLHp9M2boxrOACYDB=fgruhLOLdqg9yA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-30 10:12 ` Arnd Bergmann
2015-01-03 1:21 ` Felipe Balbi
2015-01-05 15:28 ` Arnd Bergmann
2015-01-05 15:50 ` Felipe Balbi
2015-01-04 14:32 ` Sneeker Yeh
2014-12-16 2:10 ` [PATCH 3/3] usb: dwc3: add a quirk for device disconnection issue in Synopsis dwc3 core Sneeker Yeh
2014-12-22 15:37 ` Felipe Balbi
2014-12-29 6:41 ` Sneeker Yeh
2014-12-29 8:07 ` Sneeker Yeh
[not found] ` <CAJ1gpc3-Wjtm54WOhO6RXjZft9BMngzyYC0-S-XnTacV-qKgMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-29 16:06 ` Felipe Balbi
2015-01-04 12:55 ` Sneeker Yeh
[not found] ` <CAJ1gpc0Uu4vS2iA_o_W5NaE_QBWDYFZJio7yKvhpaR5f=qWcGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-05 17:09 ` Felipe Balbi
2015-01-11 15:19 ` Sneeker Yeh
2015-01-12 17:20 ` Felipe Balbi [this message]
2015-01-12 17:29 ` Paul Bolle
2015-01-12 17:50 ` Felipe Balbi
2015-01-14 7:08 ` Sneeker Yeh
2015-01-14 17:02 ` Felipe Balbi
2015-01-17 10:52 ` Sneeker Yeh
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=20150112172032.GD6525@saruman \
--to=balbi@ti.com \
--cc=abrestic@chromium.org \
--cc=arnd@arndb.de \
--cc=davidm@egauge.net \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.clement@free-electrons.com \
--cc=hdegoede@redhat.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathias.nyman@intel.com \
--cc=pawel.moll@arm.com \
--cc=pebolle@tiscali.nl \
--cc=peter.griffin@linaro.org \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sneeker.yeh@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=thomas.pugliese@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.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).