From patchwork Mon Feb 20 07:35:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9582055 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7987460578 for ; Mon, 20 Feb 2017 07:37:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69E5828766 for ; Mon, 20 Feb 2017 07:37:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D1A0287FB; Mon, 20 Feb 2017 07:37:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C22FB28766 for ; Mon, 20 Feb 2017 07:37:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbdBTHhj (ORCPT ); Mon, 20 Feb 2017 02:37:39 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:36026 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751126AbdBTHhg (ORCPT ); Mon, 20 Feb 2017 02:37:36 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 20 Feb 2017 16:37:19 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 4C12554C09; Mon, 20 Feb 2017 16:37:19 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 3AE7E18070; Mon, 20 Feb 2017 16:37:19 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 33E6D1806F; Mon, 20 Feb 2017 16:37:19 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id SAF18445; Mon, 20 Feb 2017 16:37:19 +0900 X-IronPort-AV: E=Sophos;i="5.35,185,1483974000"; d="scan'208";a="235129185" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 20 Feb 2017 16:37:18 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=d3pbdI/EXNVlK9mqwr4GCf1d5jM7WA9Ajk9h11lF7EI=; b=deeR/HHx6uLEyF5UY3azmXO6nPOu1B8yDEziSoZ9oqCMhEzYQUMKqeWQLhzmY/xT/n7Ybh3ny2OWagbvV1ZgM8gIv/aF0S5bMe21sGffNrn26rdXcdTSFqsGQfGAqszYz3n4exeblPAAsYrYZpW8YKLCznfK7pjFMndSm/xPcVI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by HK2PR06MB0548.apcprd06.prod.outlook.com (10.161.183.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Mon, 20 Feb 2017 07:37:12 +0000 From: Yoshihiro Shimoda To: , , , CC: , , , Yoshihiro Shimoda Subject: [PATCH/RFC 2/2] usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume Date: Mon, 20 Feb 2017 16:35:11 +0900 Message-ID: <1487576111-29287-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487576111-29287-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1487576111-29287-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR0101CA0038.jpnprd01.prod.outlook.com (10.167.173.176) To HK2PR06MB0548.apcprd06.prod.outlook.com (10.161.183.153) X-MS-Office365-Filtering-Correlation-Id: 5d725a97-0d70-44a9-669a-08d459634948 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:HK2PR06MB0548; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0548; 3:NI2KFNCp2YC4QFC4h/DXQNaBSX9xoBmTOUXV6uzd/NMn1i8T0ckrjdl/rE0eZwf8+jYO/d57JOFJERBnAEnLYD/IZis2VWjP7xtfQ/uMonErzdj3jMcdyKvImZNd0kFXCWh8VqIiLuKQm9jqP/j41AnNjFS6u2tc/Yua2BS9uVdNNRSTDL0lUZhsZ+Qn912dc/8XwGHTotdcwiRfmqmx4D3G384K5oObegd9lBuU/jkDuAqhXxBNBNJZyLjQWkbHRat9qHT4hM68/vJAiVftLxX5cpOKlkyQihpgOGRaNe4=; 25:HW1VDJ5wDOdt9TnmVf0BBmnD8CLzwGrwVpqb/28FyRXXeM3MmbFA7r0rKVC6aD4fwOYQFJiDdHOBqJKawBWhJkK4FYILN+yabewXs3HdaAA1UU+NHCzhXyYxBUgFEobRF5P1ZhJsV8pqrGcWhY/X7aw6BwzOPTnF/rKVgf09JAZ6kk/qE8ABx8hvaKSaL7xisv7xDv0JMq8IICBxw5KMlfQjNaWLoJRs/atfg3IMzVXMHyfXLeUBTIO9zltS4CQm3s1xloR950U2ezBDKL6H01BDoeCUlbfv2rzd2sVYSrLV4Jr5Je9UjLzdPASJIgs9L7kqBRacU/U/KjPB3de4H44emi3GzQnu24dwzU8nFkj3gUwLnheZkK8ieqOWi3Jd7kD4VMw5Cz7eEtabRi47Q4tBpKKojN43BIPCZiHaEwQ0tJij9B4TUrRfwC1NltardC7jOjJC/D2kR9zDrhbgaA== X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0548; 31:flCOAc/k/q2IFWoupM0YYZfJl/aW0zpkhn/+TB3c+INAEhFHrKZfHd9oqaUibvWrYsS4KTM0hPijKd1xPHkE/sEuS6sWe3XZJ8BGk2kb6P5EK5I7THDDKDL6kT7naEdEe1dRjyUpWxV8q4o1oneZJihns6LsUq4iYGlTDvLlvbjqFtzvVindV2M5VgRgqklxleM6Dt7WWo9R/63d7ywVMj7FUCxqR2zJj1xLtuKBXEiG/36MID5DXa6ekU2nRYW2; 20:KE/E/qy+kkY/gxi2MWt5X++VxF8nbr5wlukDro8+ejst7xpEqwotA5jkyd0uhNJ/q71OXF+MJ1FVRxOPCvEFvHoQQVqNtPytpL9O167XUvqTJW9a1Hv7XLJktwSEfAmtHEZya/W6CYAZCrl7M1XhG/OkO1I71w7EWR+plrIsUDSxW9Iql+WbFiiklOJ3jgNYjx2fxKvj2lx/X5O4fMQtHzhxRHMjTPtCZ3vY6E2QZS8Xj8mPaoHN3VMmZE+yf1bHNzS7P04gJJhGVcqmbtqLXvGWTtPLpNyTUHcVWb7lAuF0IeW0sV1TEAd4+hRmvXX7Cg3YdbwQm/e1e5YY94Cu2SfzxDpMpfR/rrOpbvzz3mw3v8HaaqJogTDcY2JdYMFWCJw84v3I04rRD2AMOh2hT/5C7g5vjZGFH86CrLz08jyyt0nMspeAdHJHKpSe3mhbHYEEib5Yjvp8cTeK0yNxXsUKvwwyIz+bZU6cM7b7sAyHyp6amRH7LT83Qa13Q80H X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123558025)(20161123555025)(6072148); SRVR:HK2PR06MB0548; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0548; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0548; 4:XjWQJhGhxhvbNFXrGKt2yNzCh6xM3S4fxSfnwndcmoXRcRV1QzGLVk0pjgT/ukI1SzbW6FVSfPKfrz88aJxacBDmzCvHV/NyW+9T9nTInCcpfVuQStTSL/h9Ahw5XWfFyFwrmqo2uMLU2GoOG/a0+mfqOk6CX62wLmmEgXQ6gKesU1cksUsaAYqHDHzz/Yf8GFd/ESu6dvNthx/Rrn603clzMTXafum1y5TmgetnTgbSKsbT/E+gaKScRhxW7FsrWC8XrJeG3uN2QAT63ZrU5nwsVGhoUaxBR7I7WUL+iDpyEInFPOHeldlNKYrqRd8xQAoYQu+IaqVAXogtCMYSVG9c6lRn0FoWJ5VELrOhntJY+FXrgXKbdb0Hp1v9V47Nn+dpO0v7BSHTWIdOZuA+xnv45XmDDIpbX0MiD1BIxYUtlG74iGzHfV3CrNdrOrFxhO/SYh8/mDS6nLL4d89c+O7jfM4iPcVQmJSYxuyjEhipRaGuPGxdY9BnBpbZFjgqrqnv3GegPV9SI1I+kXLW9nASO2Ohhh3YNa6hPUSFT5rHOzUks1EkvyamdgtqpBPyRqDmHfDlq1b8oFvDBk15WtpLRUEiJK8TB5sguFGTfUxSSM4rhCHfeHq/CcEPAeDbR7Oo73E2Cxpm9mesu60nrQQU12ipUYEKlHpc2j7Cu04= X-Forefront-PRVS: 02243C58C6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(39860400002)(39840400002)(39850400002)(39410400002)(189002)(199003)(53936002)(47776003)(36756003)(101416001)(6506006)(42186005)(4326007)(2906002)(25786008)(78352004)(6512007)(106356001)(105586002)(7736002)(305945005)(6486002)(50466002)(33646002)(48376002)(76176999)(66066001)(68736007)(50226002)(5660300001)(2171002)(2950100002)(42882006)(6116002)(50986999)(54906002)(3846002)(38730400002)(8676002)(81166006)(81156014)(5003940100001)(92566002)(189998001)(107886003)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0548; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:0; A:0; LANG:en; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0548; 23:fF9LlOMglfFWjvMYfGksRy9m29B2etDMPkGP6UsJU?= =?us-ascii?Q?ds1B1/XUVtWmVU6JEzuulb8OZAfSiu0xLYaCglpgNirUMh31Z1pxXBdMLQLA?= =?us-ascii?Q?jci/Hbu2w0CjNxzUvw7vpYXB7KedSJr9o88/pPTtc4VfcrAoM7A8zRntFw3n?= =?us-ascii?Q?hKZByDnk2J8OKIZ4sob7YkGOE3aEIpMIld3YpViG11DcxTtPhzzfBO+Aa4r2?= =?us-ascii?Q?EIAQdP06K3PNzlI7tBV5A45Or+OnhniGhP5bYyG9rng0gHbh8P+0zz3TWJb4?= =?us-ascii?Q?XMrNOgVdpUZQaDx+QoolJHTfHvLyhl/bflFiWgYEiG+e4mrzTNb9xFs4eISg?= =?us-ascii?Q?A7UuwvbKr8z3G2XdCLIGCLrn1fnpXUSyW/9hBDY9fC6jn+8MKpFi6OQlyVU3?= =?us-ascii?Q?TBzdYnr4mSv1/lloT6MudslYEgfiEyMqsdu9ITx/b5T4pXRzWUW/jmvKUUcU?= =?us-ascii?Q?rjHiGOsYkuNXJks7mZs8RfRw7iGUhyNK+seVeNRSzZoyQ4hl5sz1vF+Gbgyg?= =?us-ascii?Q?Oe+fR/P12SiQwT27ml9p6prcgmpVd/PCMByKd433/4sb1hy6/ZRzsoXD2Err?= =?us-ascii?Q?yXf1gv8+KRMEXno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z5OY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2017 07:37:12.4229 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0548 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes an issue that a usb 1.1 device is not connected in system resume and then the following message appeared if debug messages are enabled: usb 2-1: Waited 2000ms for CONNECT To resolve this issue, the EHCI controller must be resumed after its companion controllers. So, this patch adds such code on the driver. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/ehci-platform.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a268d9e..65a7725 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "ehci.h" @@ -297,6 +298,8 @@ static int ehci_platform_probe(struct platform_device *dev) goto err_power; device_wakeup_enable(hcd->self.controller); + if (usb_of_has_companion(hcd->self.controller)) + device_enable_async_suspend(hcd->self.controller); platform_set_drvdata(dev, hcd); return err; @@ -370,6 +373,7 @@ static int ehci_platform_resume(struct device *dev) struct usb_ehci_pdata *pdata = dev_get_platdata(dev); struct platform_device *pdev = to_platform_device(dev); struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); + struct device *companion_dev; if (pdata->power_on) { int err = pdata->power_on(pdev); @@ -377,6 +381,10 @@ static int ehci_platform_resume(struct device *dev) return err; } + companion_dev = usb_of_get_companion_dev(hcd->self.controller); + if (companion_dev) + device_pm_wait_for_dev(hcd->self.controller, companion_dev); + ehci_resume(hcd, priv->reset_on_resume); return 0; }