From patchwork Fri Apr 22 09:07:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 8907321 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E858BF29F for ; Fri, 22 Apr 2016 09:08:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 498E72025A for ; Fri, 22 Apr 2016 09:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DEBD2021B for ; Fri, 22 Apr 2016 09:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbcDVJIO (ORCPT ); Fri, 22 Apr 2016 05:08:14 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:8660 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753874AbcDVJIH (ORCPT ); Fri, 22 Apr 2016 05:08:07 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 22 Apr 2016 18:08:05 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 359D9438D3; Fri, 22 Apr 2016 18:08:05 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 3821D1806F; Fri, 22 Apr 2016 18:08:05 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 2E70E1800A; Fri, 22 Apr 2016 18:08:05 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id UAA26160; Fri, 22 Apr 2016 18:08:05 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="209921734" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 22 Apr 2016 18:08:04 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CDNLv/yyF5sF9Fm+ncgo+HaFWpd/UIF6fNq8rTnxvao=; b=DKfEWvO2XvGtP34MO5cezFO2W5k2JEjEZ6zV3lxeOtk/ZuK8tFjc+UbVJg0tc65jj/l+PAOPOWifQYNW0rI3LNAZtQojksyFp3E5gAPV7CME0wTpBfDvBvlfj0rdt8qXvj2CcIUnb3mCJDiBPxUYcRsB0Y9Y7TRCpNGZ79UR4Go= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=renesas.com; Received: from localhost (211.11.155.144) by HK2PR06MB0914.apcprd06.prod.outlook.com (10.162.246.29) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 09:08:02 +0000 From: Yoshihiro Shimoda To: , CC: , , , Yoshihiro Shimoda Subject: [PATCH v2] usb: host: xhci-rcar: Avoid long wait in xhci_reset() Date: Fri, 22 Apr 2016 18:07:56 +0900 Message-ID: <1461316076-1444-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0038.apcprd06.prod.outlook.com (10.164.91.48) To HK2PR06MB0914.apcprd06.prod.outlook.com (10.162.246.29) X-MS-Office365-Filtering-Correlation-Id: 60599c5c-0192-4e6a-c272-08d36a8d9c07 X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0914; 2:4hddYJgy1Ll3dCAoVgqeqIc3lW6Ft3W2a9ShWLEk6H7LRk0ukdUnR5zV29SBZ568sMzDJQ9fvAxFSGJVsVf41onhfNUi0dMqBo9J/51t8cGyvaAlU0dM8MciXtm4QmOsVQiEgv4Y33owHr2w0XC9u9L4jlp5l8KxAagp/PFvoKb5MA3bbbY6V3R/Muomw31Z; 3:TpZZPnmXttKTYADERzO+nm/yabjzmKPC0Yk1jjWz4k5CW0IiFDYoICCxD8xvZNkYWIT5a3emFAix2++o8HTkCfp9bP6NN+3dYlMf8ieiBjhTPHGQCszdc3cnwT/YBVz+; 25:gIcO9XqL/PX+OzOKgdtiwjbQJB3rjPZRnThuwzu6lHjZlJUtJUshfM+8c9Is/bey7GG/r1HQprltgx8qNt+hmG3FxeYImBva9vxRBRWjZczQ+FlMn3ztzcYySY1rUBdBlSS+gK7NS6aysGOCF3LnES3S8qXbzgmg9DF7+BDgXrPIbPTbJOSDqvh3/CYTXRML/r9abLoX5onGdc0pfy8nodzKIgxFsqvQbyhnX9/izoLlTmkAy4sf2BmUFSSJnh8FfxRtdQ0uMWkbol+6betSw430+pPlzMpXmMAT5USlwSGPb5g+mBVOjwhW2APSReLiBNIsDSNnnsmgZXarP6D0yQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB0914; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0914; 20:nSrJWBbKhmKr1ZR72IqPPILSG4ONDCUQ4EkOY5KBRaXX2sVxpLzCLmgCd5VbRW35DXpLoO2pUr1r5VgBdFJEyBMBF38SCwJwJP+GUZ0e3W1LuQ6oOnEoPz4BKHc1SLdqH//3jHO23fZHe/8QoQE2uCyTCinC3Ug+f/4dispOo3IKvkWf+Dq9B/j9P0M5MiwQpWjcpnQLUYyuZfvG/RwcK/Ss8n7LPI1MFZF/jWV2PcPkKzvHVfxhqSMV5yFEWfCvRTT4+yt80WvuB3ftjrxZGha9yAP3EW5hJcTqfoG96haAJ/Ltp7M/34uIHnteVkcUqEANRpnEPl/PzVOoSqHDN9FlcBy0fkyNkeD4yegWi7Wa52KwD+IlzgmqXgge6QYJItb7CQAC/B8RNTHDQ4GgQT+ogJ+wxJeczE4JFqGvWc+WPamyrmk9J2ShVYXzvWkZ18PBrpDCLp8LWlHoUaOCcp+Z2z15WKu6ZYyHJRosaf5C9U45foD76cSlzxXD55Gx; 4:ymxNZbnUl/mdtScV4UMiBGfqSKw+3om+WJSIzwnbU5iyjNCZ9ORlAx3J71+MkLSTeEkIuUV5vArG9le3hhSgGGjCU/2OVr2KUJUlfYawZfCDp+lV0enPm5WkqZX6i2zCIlXDsE1Jwngvyi1PLXIaTnqohuGU5veIvfIwg8RtaNWy200HX6P1JNV6kew2bkjtpN+8QDhW6grBiJoKwvTX7aqkez0Bw0qtsiei3S6lS3F2Q0rjNwArtTAEmoHrz45AYjkg12RK2cHr5k/pRAd+R/hbGS/Drx/hra63RiBs/42BMf1FpGbEkkeAHZZWG9ZtYmQIOChCdYa1su1B9psoKiq7UeS8B07Am9uvnIRiZdXj8QtiTobMnsDkvzWaoRdYXsGvq9zOwDrz/BcNUiXrVw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:HK2PR06MB0914; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0914; X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(229853001)(92566002)(2906002)(4001430100002)(42186005)(5008740100001)(66066001)(77096005)(48376002)(36756003)(6116002)(5004730100002)(3846002)(5003940100001)(47776003)(15975445007)(50466002)(50986999)(33646002)(4326007)(189998001)(81166005)(586003)(78352003)(5001770100001)(107886002)(76506005)(50226001)(1096002)(19580405001)(19580395003)(42382002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0914; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0914; 23:e/H5BoDm1xUT4BEbC5t/3IZXizYCH5fqmM2nrTYzI?= =?us-ascii?Q?icJxy8Bxg//lHYVhJe/VpASwMTrbQyaSy44GGlJ1hv9sV0aHAVLRBe0PKnA5?= =?us-ascii?Q?izRs1eT7bVzmxC3WejHQJx/yg9sQoGGmQ8PFckRUHNxnlemOy2YnQl3HkJN5?= =?us-ascii?Q?ZOryHFzqQWAXe9NDEU7u2xBYpO21BhfzSbC3LeC5NcDlHyT7fjigFEHVLY2q?= =?us-ascii?Q?v1H+8UMjQrLyCjrrTHXwFsgXDNBnLgfrPPK0TsGz1tiNFBlIxehOEhC9xLH/?= =?us-ascii?Q?/xpXi6XX6VPbncWhNhEXPAHM9bwHREMYTFp1kN9c1s5yTXJN2TcffkocnwWk?= =?us-ascii?Q?+2c5kFZgtfmOxU08AEi8/9oHp81iwMm8NJZpvbJDISW64UGQ4bz5l3H+Kw7d?= =?us-ascii?Q?2SHS5vt+fUFZUULDZF850RbBYFT3OYgabriUjEXl6J0MH7mD1DlPuvPMiW6M?= =?us-ascii?Q?7rUxNDE0VCiDG0vMSnkm88C1V4BVcW5z0aeiYrLHYfvbcIfeKiLAf0m5voPO?= =?us-ascii?Q?HyueY9KtCnyS3pqgMhZPXFLOzOAQ0VKJUNt3EeuW4qoBsjhiZ9g8yRgVNOtx?= =?us-ascii?Q?OXPwqro7iX5AuQI02EZSp4rYG8eKqkIUQQRZ64Z2RrEvV/O4wnCdX4cEtXwh?= =?us-ascii?Q?hdThGaLDWeIAubG3NzaW7qmpapik+7Hfen9SjDZpkD2bndYkV6iVxRjhqBxj?= =?us-ascii?Q?nPr3CaAHVqYSKaWJKkd3pBhK+VD3b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utput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 09:08:02.8809 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0914 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The firmware of R-Car USB 3.0 host controller will control the reset. So, if the xhci driver doesn't do firmware downloading (e.g. kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and CONFIG_USB_XHCI_RCAR is not set), the reset of USB 3.0 host controller doesn't work correctly. Then, the host controller will cause long wait in xhci_reset() because the CMD_RESET bit of op_regs->command is not cleared for 10 seconds. So, this patch modifies the xhci_rcar_init_quirk() in xhci-rcar.h to exit the probe function immediately. Fixes: 4ac8918f3a7 (usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI controllers) Cc: # v3.17+ Signed-off-by: Yoshihiro Shimoda --- Changes from v1: - Revise the commit log. (http://www.spinics.net/lists/stable/msg130007.html) drivers/usb/host/xhci-rcar.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-rcar.h b/drivers/usb/host/xhci-rcar.h index 2941a25..2afed68 100644 --- a/drivers/usb/host/xhci-rcar.h +++ b/drivers/usb/host/xhci-rcar.h @@ -24,7 +24,11 @@ static inline void xhci_rcar_start(struct usb_hcd *hcd) static inline int xhci_rcar_init_quirk(struct usb_hcd *hcd) { - return 0; + /* + * To avoid wait and timeout in xhci_reset() if CONFIG_XHCI_RCAR is + * disabled, this function fails. + */ + return -ENODEV; } #endif #endif /* _XHCI_RCAR_H */