From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Vikas Sajjan <vikas.sajjan@linaro.org>,
linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
vpalatin@chromium.org, jwerner@chromium.org,
tianyu.lan@intel.com, burzalodowa@gmail.com,
gregkh@linuxfoundation.org, gautam.vivek@samsung.com,
dianders@chromium.org, balbi@ti.com, joshi@samsung.com
Subject: Re: [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs
Date: Mon, 9 Dec 2013 10:24:10 -0800 [thread overview]
Message-ID: <20131209182410.GA5220@xanatos> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1312091019400.1439-100000@iolanthe.rowland.org>
On Mon, Dec 09, 2013 at 10:24:52AM -0500, Alan Stern wrote:
> On Mon, 9 Dec 2013, Vikas Sajjan wrote:
>
> > Does warm reset while activating SuperSpeed HUBs if the hub activate type
> > is HUB_RESET_RESUME.
> >
> > When we do Suspend-to-RAM with (any one of the 16, 32, 64 Jetflash) transcend
> > USB 3.0 device connected on 3.0 port, during resume I noticed that the
> > XHCI controller has moved to sometimes RECOVERY, POLLING or INACTIVE STATE.
> > This behaviour is inconsistent and the connection with connected USB 3.0 device
> > on 3.0 port was LOST.
Does the device eventually re-connect on the USB port? Or is warm reset
necessary to make the device connect?
Does the xHCI register restore complete after resume from S3, or is
power lost? I'm trying to figure out whether xhci_reset is called
before your issue is triggered.
> > Doing warm reset while activating SuperSpeed HUBs if the hub
> > activate type is HUB_RESET_RESUME, gets the connected device to the stable state.
> >
> > Reviewed at https://chromium-review.googlesource.com/#/c/177132/
> >
> > Tested on exynos5420 and exynos5250 with Transcend Jetflash USB 3.0 device (8564:1000)
Is this issue specific to the particular USB device manufacturer
(Transcend)? Does the same device lose connection on resume from S3
with other host controller vendors? Have you seen this issue when the
USB 3.0 device is behind a USB 3.0 hub?
I ask because this sounds like a low-level link training issue that's
specific to the exynos host or USB device. I would rather track down
which hardware is to blame than generically add a warm reset for all USB
3.0 devices.
> > rebased on Greg Kroah-Hartman's usb-next
> > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
> >
> > Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
> > ---
> > drivers/usb/core/hub.c | 41 +++++++++++++++++++++++++----------------
> > 1 file changed, 25 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index a7c04e2..d8432b0 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
>
> > @@ -1093,6 +1108,16 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> > u16 portstatus, portchange;
> >
> > portstatus = portchange = 0;
> > +
> > + /* Some connected devices might be still in unknown state even
> > + * after reset-resume, a WARM_RESET gets the connected device
> > + * to the normal state.
> > + */
> > + if (udev && hub_is_superspeed(hub->hdev) &&
> > + type == HUB_RESET_RESUME)
> > + hub_port_reset(hub, port1, NULL,
> > + HUB_BH_RESET_TIME, true);
>
> Please don't do this all the time to every attached port. Do it only
> when it is really needed.
Agreed. Can we at least limit the warm reset to devices directly
attached to roothubs? You can also change this code to get the port
status and only do the warm reset if the port link state is
USB_SS_PORT_LS_POLLING, USB_SS_PORT_LS_RX_DETECT, or
USB_SS_PORT_LS_SS_INACTIVE.
> Shouldn't you pass udev as the third argument? If not, please explain
> why not.
>
> Finally, I don't see why you put this in hub_activate(). Isn't it more
> closely connected with the reset-resume procedure for the child device?
Sarah Sharp
next prev parent reply other threads:[~2013-12-09 18:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 12:29 [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs Vikas Sajjan
2013-12-09 12:51 ` Vivek Gautam
2013-12-09 15:24 ` Alan Stern
2013-12-09 18:24 ` Sarah Sharp [this message]
2013-12-10 5:23 ` Vikas Sajjan
2013-12-10 5:30 ` Vikas Sajjan
2013-12-11 17:18 ` Alan Stern
2013-12-11 19:00 ` Julius Werner
2013-12-11 19:36 ` Sarah Sharp
2013-12-11 22:51 ` Dan Williams
2013-12-11 23:38 ` Dan Williams
2013-12-12 7:01 ` Julius Werner
2013-12-12 16:05 ` Alan Stern
2013-12-13 17:48 ` Sarah Sharp
2013-12-13 17:57 ` Dan Williams
2013-12-13 18:15 ` Alan Stern
2013-12-13 18:27 ` Dan Williams
2013-12-13 18:00 ` David Cohen
2013-12-13 18:34 ` David Cohen
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=20131209182410.GA5220@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=balbi@ti.com \
--cc=burzalodowa@gmail.com \
--cc=dianders@chromium.org \
--cc=gautam.vivek@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=joshi@samsung.com \
--cc=jwerner@chromium.org \
--cc=kgene.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tianyu.lan@intel.com \
--cc=vikas.sajjan@linaro.org \
--cc=vpalatin@chromium.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