public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>,
	linux-usb <linux-usb@vger.kernel.org>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Mathias Nyman <mathias.nyman@intel.com>
Subject: Re: Missing USB XHCI and EHCI reset for kexec
Date: Sun, 08 Jun 2014 08:35:44 +1000	[thread overview]
Message-ID: <1402180544.3979.3.camel@pasglop> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1406071133090.31120-100000@netrider.rowland.org>

On Sat, 2014-06-07 at 11:40 -0400, Alan Stern wrote:

> The current xhci-hcd driver includes a quirk flag (XHCI_SPURIOS_WAKEUP) 
> that causes the shutdown routine to reset the controller.  It wasn't 
> meant for fixing kexec problems, but I bet you could use it for that 
> purpose.
> 
> In addition, it's possible that a reset is needed in the probe pathway.

Looking at the code a bit more ... that xhci_shutdown() worries me.

It basically just whacks xhci_halt() and optionally reset() but nothing
is done that I can see to ensure that we aren't concurrently
doing things like queuing URBs, polling the root hub etc...

That's definitely not clean and while it might work (most of the time
at least) on actual shutdown it's definitely not right for kexec I
reckon.

Now there's a separate discussion that we had a while ago and might
want to resume which is to say that kexec shouldn't be calling
shutdown() anyway, but instead remove() on all drivers which is
a much better code path for the purpose of leaving the device in
a state where a driver can reconnect to it.

However, in the case of XHCI that leads to another issue described
here:

http://marc.info/?l=linux-usb&m=139483181809062&w=2

For which there was little / no discussion at all... I suppose we could
do a quirk but I don't think the problem is fundamentally
specific to the TI chip, we should probably stop both root hubs
before we halt both HCDs.

Cheers,
Ben.



  parent reply	other threads:[~2014-06-07 22:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-13 19:22 Missing USB XHCI and EHCI reset for kexec Stefani Seibold
2014-04-14  2:14 ` Alan Stern
2014-04-14 13:54   ` stefani
2014-04-14 14:49     ` Alan Stern
2014-04-14 15:25       ` stefani
2014-04-14 16:27         ` Alan Stern
2014-04-14 16:35           ` Stefani Seibold
2014-04-14 17:58             ` Alan Stern
2014-04-15 18:32               ` Stefani Seibold
2014-04-15 19:05                 ` Alan Stern
2014-04-15 19:08                   ` Stefani Seibold
2014-04-15 18:30           ` Stefani Seibold
2014-04-15 19:02             ` Alan Stern
2014-04-15 19:06               ` Stefani Seibold
2014-04-15 19:14                 ` Alan Stern
2014-04-15 19:17                   ` Stefani Seibold
2014-04-15 19:14               ` Stefani Seibold
2014-04-15 19:34                 ` Alan Stern
2014-04-14  9:42 ` Benjamin Herrenschmidt
2014-04-14 15:44   ` stefani
2014-04-14 21:48     ` Thadeu Lima de Souza Cascardo
2014-04-15 10:04       ` stefani
2014-04-15 12:20         ` Thadeu Lima de Souza Cascardo
2014-04-15 15:00           ` stefani
2014-04-15 18:33             ` Thadeu Lima de Souza Cascardo
2014-04-15 18:42               ` Stefani Seibold
2014-04-15 18:49                 ` Thadeu Lima de Souza Cascardo
2014-04-15 18:54                   ` Stefani Seibold
2014-06-07  8:15                     ` Benjamin Herrenschmidt
2014-06-07 15:40                       ` Alan Stern
2014-06-07 21:11                         ` Benjamin Herrenschmidt
2014-06-07 22:35                         ` Benjamin Herrenschmidt [this message]
2014-06-08  1:09                           ` Alan Stern

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=1402180544.3979.3.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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