public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Rajesh Bhagat <rajesh.bhagat@nxp.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com, sriram.dash@nxp.com
Subject: Re: [PATCH] usb: xhci: Fix incomplete PM resume operation due to XHCI commmand timeout
Date: Fri, 18 Mar 2016 13:20:37 +0200	[thread overview]
Message-ID: <56EBE485.1060301@linux.intel.com> (raw)
In-Reply-To: <1458284463-12743-1-git-send-email-rajesh.bhagat@nxp.com>

On 18.03.2016 09:01, Rajesh Bhagat wrote:
> We are facing issue while performing the system resume operation from STR
> where XHCI is going to indefinite hang/sleep state due to
> wait_for_completion API called in function xhci_alloc_dev for command
> TRB_ENABLE_SLOT which never completes.
>
> Now, xhci_handle_command_timeout function is called and prints
> "Command timeout" message but never calls complete API for above
> TRB_ENABLE_SLOT command as xhci_abort_cmd_ring is successful.
>
> Solution to above problem is:
> 1. calling xhci_cleanup_command_queue API even if xhci_abort_cmd_ring
>     is successful or not.
> 2. checking the status of reset_device in usb core code.


Hi

I think clearing the whole command ring is a bit too much in this case.
It may cause issues for all attached devices when one command times out.

We need to look in more detail why we fail to call completion for that one aborted command.

The bigger question is why the timeout happens in the first place?

What kernel version, and what xhci vendor was this triggered on?

It's possible that the timeout is related either to the locking issue found by Chris Bainbridge:
http://marc.info/?l=linux-usb&m=145493945408601&w=2

or the resume issues in this thread, (see full thread)
http://marc.info/?l=linux-usb&m=145477850706552&w=2

Does any of those proposed solutions fix the command timeout for you?

-Mathias

  reply	other threads:[~2016-03-18 11:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  7:01 [PATCH] usb: xhci: Fix incomplete PM resume operation due to XHCI commmand timeout Rajesh Bhagat
2016-03-18 11:20 ` Mathias Nyman [this message]
2016-03-21  4:18   ` Rajesh Bhagat
2016-03-21  9:16     ` Mathias Nyman
2016-03-22  5:19       ` Rajesh Bhagat
2016-03-22 12:05         ` Mathias Nyman
2016-03-23  3:53           ` Rajesh Bhagat
2016-03-23 14:22             ` Mathias Nyman
2016-03-28  6:13               ` Rajesh Bhagat
2016-03-29 17:21                 ` Mathias Nyman
2016-03-31  3:51                   ` Rajesh Bhagat
2016-03-31 14:36                     ` Mathias Nyman
2016-04-01  3:55                       ` Rajesh Bhagat
2016-04-01 10:49                         ` Mathias Nyman
2016-04-11  3:46                           ` Rajesh Bhagat
2016-03-18 14:21 ` Alan Stern
2016-03-21  4:22   ` Rajesh Bhagat
2016-03-21 15:02     ` 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=56EBE485.1060301@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=rajesh.bhagat@nxp.com \
    --cc=sriram.dash@nxp.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