From patchwork Tue Jun 22 11:24:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Daehwan X-Patchwork-Id: 12336885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FAFEC49EA4 for ; Tue, 22 Jun 2021 11:39:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 629BE61042 for ; Tue, 22 Jun 2021 11:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbhFVLlh (ORCPT ); Tue, 22 Jun 2021 07:41:37 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:41647 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbhFVLlg (ORCPT ); Tue, 22 Jun 2021 07:41:36 -0400 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210622113917epoutp04445aa1ed51c4a01ad18f41af49fce3a4~K5JgHjxS42911029110epoutp04m for ; Tue, 22 Jun 2021 11:39:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210622113917epoutp04445aa1ed51c4a01ad18f41af49fce3a4~K5JgHjxS42911029110epoutp04m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1624361957; bh=s1Avvz1h66BixbIt3cMuqFT42a4Y6eRXBpAQuPpp6qw=; h=From:To:Cc:Subject:Date:References:From; b=FHN3bvqEZ5XNAyPokSjfYGbwy+y4cnkHdLZmDqxYjrVpbnvMbKM9IwZi3NKxlClzA TTjVOH5Z6gTESh24JfFf3GAhSf9hXvJ4yEA2i6Di0JHzXcQTQjxWl9tOEa/LuZ54Mu lc5u4lyvJNoEq0WWPZIZ/QQzXm1+XdsMjd99371U= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210622113916epcas2p32f6acc194b1a6793eb53850b6ae5ef49~K5Jfgv8ZU1372513725epcas2p3F; Tue, 22 Jun 2021 11:39:16 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.40.187]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4G8PYv3tWsz4x9Q1; Tue, 22 Jun 2021 11:39:15 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id D0.0B.09571.3EBC1D06; Tue, 22 Jun 2021 20:39:15 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20210622113915epcas2p284c61291fc9d83487f6dfebb65fd4e9b~K5JeJ7Uuk0831208312epcas2p2J; Tue, 22 Jun 2021 11:39:15 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210622113915epsmtrp12b2960d91be90a33f08cf2cbff0bc16b~K5JeJPXHz0725207252epsmtrp1W; Tue, 22 Jun 2021 11:39:15 +0000 (GMT) X-AuditID: b6c32a48-1dfff70000002563-59-60d1cbe39e04 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 61.53.08394.2EBC1D06; Tue, 22 Jun 2021 20:39:15 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210622113914epsmtip263687963dec77073818dc30645a0b2cf~K5Jd_A5g40096900969epsmtip2f; Tue, 22 Jun 2021 11:39:14 +0000 (GMT) From: Daehwan Jung To: Greg Kroah-Hartman Cc: Daehwan Jung , Mathias Nyman , 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 Message-Id: <1624361096-41282-1-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHKsWRmVeSWpSXmKPExsWy7bCmme7j0xcTDFZskLW4s2Aak0Xz4vVs Fpd3zWGzWLSsldmiedMUVgdWj8V7XjJ57J+7ht2jb8sqRo/Pm+QCWKJybDJSE1NSixRS85Lz UzLz0m2VvIPjneNNzQwMdQ0tLcyVFPISc1NtlVx8AnTdMnOA9ioplCXmlAKFAhKLi5X07WyK 8ktLUhUy8otLbJVSC1JyCgwNC/SKE3OLS/PS9ZLzc60MDQyMTIEqE3IytnZOZyv4yFGxYFUL YwNjP3sXIyeHhICJxI9ll1lBbCGBHYwSc5YEdjFyAdmfGCWunLrKAuF8Y5S48/oTK0zHwstz 2CESexkl7vZ8YYJo/8EosW2dTRcjBwebgJbE94WMIGERAWOJ/rOzwOqZBfoYJeZ3fwUbJCxg L3Fn/RKwIhYBVYnDs46C2bwCrhLL585igVgmJ3HzXCczhN3PLrHjbh2E7SIxc8ZVNghbWOLV 8S1Q70hJvOxvYwe5QUKgXGLRfDuQvRICHYwSaz6dZYSoMZaY9aydEaSGWUBTYv0ufYhyZYkj t8C2MgvwSXQc/gs1hVeio00IolFZYvrlCdBQkJQ4+Poc1GEeEhd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vH0w0R//jX/N/ql VLVP+pr8QOZUxtOw5oeyliz/+kTVPFpnvL388PK3niK3ELnLspqim9YZtPmXTQnYbrY7x4G3 Z/X8/xdKH0zmiuhZkWpgVqoebq7s+ii1+lKfsCHrtIAXaoEBntm7P31m/rh9Xf1HAcWs7r1u VewXQlh02nh5O/xnvVm8wokzbsH+tNrGCxzl7QVRScKOrgeaPllUFn+aumh1kDP7QRWb1bZh DExdB2OFXpuzsiiXNB6TFXU2MC589fXNnsd+f9Z1epxT/j3B5t+qsLS+g/6cO6aon2Vgn77j cMhzTX071op/vyP+fw9O157FMjPZXWdP3uop7UosxRmJhlrMRcWJAH874HmDAgAA X-CMS-MailID: 20210622113915epcas2p284c61291fc9d83487f6dfebb65fd4e9b X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210622113915epcas2p284c61291fc9d83487f6dfebb65fd4e9b References: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- 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;