From: Ajay Gupta <ajaykuee@gmail.com>
To: linux-usb@vger.kernel.org
Cc: felipe.balbi@linux.intel.com, oneukum@suse.com,
mathias.nyman@linux.intel.com, Ajay Gupta <ajaykuee@gmail.com>,
Nagaraj Annaiah <naga.annaiah@gmail.com>
Subject: [v3] usb: xhci: increase CRS timeout value
Date: Mon, 11 Jun 2018 14:10:23 -0700 [thread overview]
Message-ID: <1528751423-12463-1-git-send-email-ajaykuee@gmail.com> (raw)
Some controllers take almost 55ms to complete controller
restore state (CRS).
There is no timeout limit mentioned in xhci specification so
fixing the issue by increasing the timeout limit to 100ms
Signed-off-by: Ajay Gupta <ajaykuee@gmail.com>
Signed-off-by: Nagaraj Annaiah <naga.annaiah@gmail.com>
---
Changes from v2->v3
Updated commit message for timeout value to 100ms
Changes from v1->v2
Updated timeout value from 55 to 100ms and added a comment.
drivers/usb/host/xhci.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 8c8da2d..fa7bd71 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1043,8 +1043,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
command = readl(&xhci->op_regs->command);
command |= CMD_CRS;
writel(command, &xhci->op_regs->command);
+ /* Some controllers take upto 55+ ms to complete
+ * the controller restore so setting the timeout to
+ * 100ms. Xhci specification doesn't mention any
+ * timeout value.
+ */
if (xhci_handshake(&xhci->op_regs->status,
- STS_RESTORE, 0, 10 * 1000)) {
+ STS_RESTORE, 0, 100 * 1000)) {
xhci_warn(xhci, "WARN: xHC restore state timeout\n");
spin_unlock_irq(&xhci->lock);
return -ETIMEDOUT;
next reply other threads:[~2018-06-11 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 21:10 Ajay Gupta [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-19 8:08 [v3] usb: xhci: increase CRS timeout value Mathias Nyman
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=1528751423-12463-1-git-send-email-ajaykuee@gmail.com \
--to=ajaykuee@gmail.com \
--cc=felipe.balbi@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=naga.annaiah@gmail.com \
--cc=oneukum@suse.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).