All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daehwan Jung <dh10.jung@samsung.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daehwan Jung <dh10.jung@samsung.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: usb: host: Reduce xhci_handshake timeout in xhci_reset
Date: Tue, 22 Jun 2021 20:24:56 +0900	[thread overview]
Message-ID: <1624361096-41282-1-git-send-email-dh10.jung@samsung.com> (raw)
In-Reply-To: CGME20210622113915epcas2p284c61291fc9d83487f6dfebb65fd4e9b@epcas2p2.samsung.com

It seems 10 secs timeout is too long in general case. A core would wait for
10 secs without doing other task and it can be happended on every device.
It's better to reduce timeout for general case and use new quirk if needed.

Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
---
 drivers/usb/host/xhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9248ce8..0a1b6be 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -196,7 +196,7 @@ int xhci_reset(struct xhci_hcd *xhci)
 		udelay(1000);
 
 	ret = xhci_handshake(&xhci->op_regs->command,
-			CMD_RESET, 0, 10 * 1000 * 1000);
+			CMD_RESET, 0, 1 * 1000 * 1000);
 	if (ret)
 		return ret;
 
@@ -210,7 +210,7 @@ int xhci_reset(struct xhci_hcd *xhci)
 	 * than status until the "Controller Not Ready" flag is cleared.
 	 */
 	ret = xhci_handshake(&xhci->op_regs->status,
-			STS_CNR, 0, 10 * 1000 * 1000);
+			STS_CNR, 0, 1 * 1000 * 1000);
 
 	xhci->usb2_rhub.bus_state.port_c_suspend = 0;
 	xhci->usb2_rhub.bus_state.suspended_ports = 0;
-- 
2.7.4


       reply	other threads:[~2021-06-22 11:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210622113915epcas2p284c61291fc9d83487f6dfebb65fd4e9b@epcas2p2.samsung.com>
2021-06-22 11:24 ` Daehwan Jung [this message]
2021-06-22 19:56   ` usb: host: Reduce xhci_handshake timeout in xhci_reset Greg Kroah-Hartman
2021-06-28  2:25     ` Jung Daehwan
2021-06-28  6:53       ` Greg Kroah-Hartman
2021-06-28  6:55         ` Jung Daehwan
2021-06-28  7:49           ` Mathias Nyman
2022-02-11  6:46             ` Pavan Kondeti
2022-02-11  7:43               ` Pavan Kondeti
2022-02-14  4:08                 ` Pavan Kondeti
2022-02-14  5:22                   ` Greg Kroah-Hartman
2022-02-14  5:52                     ` Pavan Kondeti

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=1624361096-41282-1-git-send-email-dh10.jung@samsung.com \
    --to=dh10.jung@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.