From patchwork Tue Feb 21 10:59:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9584241 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 CB6D1600CA for ; Tue, 21 Feb 2017 11:02:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA1E7262F2 for ; Tue, 21 Feb 2017 11:02:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F13D26E91; Tue, 21 Feb 2017 11:02:01 +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 37FB5262F2 for ; Tue, 21 Feb 2017 11:02:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbdBULCA (ORCPT ); Tue, 21 Feb 2017 06:02:00 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:41626 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751623AbdBULBx (ORCPT ); Tue, 21 Feb 2017 06:01:53 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Feb 2017 20:01:51 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 60DE062234; Tue, 21 Feb 2017 20:01:51 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 487D718070; Tue, 21 Feb 2017 20:01:51 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 412131806F; Tue, 21 Feb 2017 20:01:51 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id WAF32526; Tue, 21 Feb 2017 20:01:51 +0900 X-IronPort-AV: E=Sophos;i="5.35,189,1483974000"; d="scan'208";a="235289876" Received: from mail-sg2apc01lp0247.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.247]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 21 Feb 2017 20:01:49 +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=Yz132ttF2OB+4MPVwWpGvRVI+3bXvw7V8dv8EpCCvSs=; b=HvIl8P6eF/rH5gyqljlIPY360TWS2OrAKffe6Xs1Bi/Y3wkVjVJQdeTMXcg+++EPA4sEHfrfyFkFTWYgLlKIslWq1gt4fs2FbvxZ9b7sBFfwBXN2stSVL9VP1sFpIysoI6hudMILa3MCF6Vvu2xUMcAKQQNvwjjc31YTtBrEsIg= 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; Tue, 21 Feb 2017 11:01:47 +0000 From: Yoshihiro Shimoda To: , , , CC: , , , Yoshihiro Shimoda Subject: [PATCH v2 2/2] usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume Date: Tue, 21 Feb 2017 19:59:48 +0900 Message-ID: <1487674788-12599-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487674788-12599-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1487674788-12599-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSXPR01CA0024.jpnprd01.prod.outlook.com (10.167.143.179) To HK2PR06MB0548.apcprd06.prod.outlook.com (10.161.183.153) X-MS-Office365-Filtering-Correlation-Id: 0186137c-a8a1-4dfb-aae5-08d45a49085b 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:www/hejy+LHgzdxG3t8KLwP5euAXWmxxef4lekxXgMT1Iwl6C04Yzj/ZhcApz+JwWmZa22GOdhtojTF45qFF3ftkPsF1gkG7u97zDyq3jzTXxufxPaFsvEZ2djEDhc0ahp/h+1zsGEfdDSi4Lt/yuBlP1GBCGI64M6dV/ZcDybiu2WYzBzCVD8ZnedrPFdrw6M+i6l/L69Tr256t6zv8idI7AkampoMSrwbUwPbZ3HTQZXZwx6F/S52/+DzCNBQ5t89REo7xusk8JnNF5iD8kpTL7hyuNhdIXbAR3lLzLjk=; 25:P3GOqZxN2N9TWalZsHCEQ2i2mPOcuG9Nj7tGjnTm33HgZe/87XbFI980vjFP8EY6pegcZrUoeF6YpXRJVtjvWyIsc7LkF7IpB26iPJPukoBYaHprr+KS727B25jfcAlgzoN4o6kgFywp5AgfDkXVhwrALtak6BudDvdDQKSp9S0dkQ9HvdhIAvouoZNNIqi9qWa0qk22g5LNm2LqdZakOrIi+8Rerma6HuF6pb1jcbNTtqDjLg0EwCJZuDG2PVFoMpiD3fPojCGXrrOpjyPSrZNuGL+Hu5+V6h7o2Ihs1kLMkbvzaA8MRpb0jGhMVGGCJdVVXZos1eUMWl85w8Tq1D7i19SKhHu3+zUZ6JwAQZ95ySV5OpnVKJzzVU6a8T9Uhdk6c2RG3a7tf7C/aYM9rYpIkgcPMWGCYmSkNC/SATZDeWgg1i3G45B9e45LrYxeiDefQzuUuTHmOaumofNQpA== X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0548; 31:4Fpdal5doMu+jaFwvn06m8CZ5cpvoaZu13THeEN/MwMPAE1bhwmM1pFjkdDiPpffVp7L37BNgi8imwOymteffjiOgfd8nvuE5S+xdBp2BYn9CnxwFmneeGSg6OuVx8a+uVTpNiwdZoEQW4Ma7DvmnYGP1pR6EBc4asrK4mpPfboaYvXg6EE/pJ76xHQTTsz181muNYU5bw5WJ83AXh/pbtUPXkQuXsS3wp7cozkj+/A=; 20:Ez4mloNbEaBNWZrFRSA5nIjEGWDc7bWt9CoDhykm0ModKZ7Kxrv/a4+nbVb/fLPx/UpUO45gk9+KricDZlyJZ+jfPBWPSuFZBGkJyiEp7VlYMKDcwJfyDSVRBZ/C6qxJ8iC1o1arAPS1fEqDaTAbbQRpjZnhcHWUa8iPmcoQnz53llUKQ+vC8Xgf0fLwTl9vozbA+mgABGnuYBGt5Tpmsss90v5oRnnu/MRzIoHX/4PgtEsRKdJGYcSrfKmPbuFTXjusuY7/lwpbULMGaYkKcL0wt3dGIxQF7FgiMHhONkyia67mtGJtlT/HI2v0B2HYCJhtApxv+AD7i1NvUshryGIOfIkCqGmTjWmCds48EzUucKWeU4N8TKe9r9u3fReAWbmrFIjPcrmgMnLwI3kGwEftHfEXupmTUO9b5ukz5vtVG9N4T6Gy5ckrsBbIq1Yz5b3hSOviiPX0MQzM6Uo4Loj8j8TBtTJd4PlisAFOlFaNC4bx5dfviGJOhvNLF6WV 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)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123558025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:HK2PR06MB0548; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0548; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0548; 4:z8bsFqDlVJpEtNaIe44Ybk5L8t0gdnUWh/0wMKoz7GR64UuqjHZIFGkibTWw1TW9u1DTgeQMJbLG2Js37rzXy23dOGskvWR4LMKi2RX02BwT6n54k8Wrxx22o9UpYm27N41qvXW4xIdj6dGlJCp16iami/vb5AyuYEOgebeUjNynQ4eAHWLW+zh9mvA3efVMZ38j9DYGInFMeYkf6MhJC6ue60siDaENW15BLUx1CdzkHadMtGLXvOt7XBcW+U3WJVb1CiYjudo3Jj/dTIMP7JAl06kB7ezAHegOGpQnFtFoLYESt1RVI+z6aCqdFqxR70r5Jzxnvm8mttTalUQ+XFIl81B0s1Q4KyUjqV/Wslzri/JmzQIHTVRbSIyRapjEatQcNrDO3sHbf3kVa35vNUGzgw/CBLq/GZ/hPo0sGv25w0qJ98uVEc1Vj/4d/UQF8xWD+2tv3l2LQ4hC9cfULMnBTDkNoblxJoOrrtjGS4CStvy3tjBTddmjKW1V0n92lm1qCLdBp/DHlpzD2lDR/4Cb4G5BH8LWhU7bhcL6eQMW5xEWc9GuxOgdkBAYDbJADB2nB9jQiQqXcVbA+/LDyFqgwO67rq9OFg3UQ8NC+X4gWqbYh7pSsgacv0AYBHBeTBsxmIg3LUa5rNEKvu4E11tOwM5tSnY7YMNgc4sl2Ds= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(39410400002)(39850400002)(39840400002)(39450400003)(39860400002)(199003)(189002)(2171002)(68736007)(101416001)(66066001)(47776003)(36756003)(53936002)(50986999)(76176999)(48376002)(33646002)(50466002)(105586002)(106356001)(42186005)(305945005)(78352004)(7736002)(5003940100001)(50226002)(6116002)(25786008)(3846002)(54906002)(6512007)(2906002)(4326007)(2950100002)(42882006)(5660300001)(6506006)(81166006)(6486002)(81156014)(8676002)(107886003)(38730400002)(92566002)(97736004)(189998001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0548; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX: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:DxzDWkFCvTwUzyUL3EIf6CxJ0kniX2/4NUAMG0OKh?= =?us-ascii?Q?rvvIy+pOyHjSaEj1nhYArdTwbE7mAYB1uaFFqm96KX7IEEruU2m3CTFYsR1/?= =?us-ascii?Q?CzSHT2hsrCbk0m9Ni3xaBKcvZkGHgeJRnwutHIv+5esAjbtJdM9os3tN+sjS?= =?us-ascii?Q?glSUyB407144f1mt9R2QqArhGLLFgLWcsBPyeqNzimqkrHlpt2Yev8f24wvZ?= =?us-ascii?Q?L/aK4ATSXvAjjxkDBP4X0QaaP0tB68t40gkIYxoEtEgSuRMjU477tVIyoJrZ?= =?us-ascii?Q?Uq+4jciSWXqz1vQWXCxFTVStrx0E7tgckmc/TC7EMLtOqcEmNQnlq25cfmmt?= =?us-ascii?Q?B9q6yhHA5zwdNE1vngdN1R1QPPm5WAZDdJjxvPvaYCZypuOsQa3pWhtp1AYp?= =?us-ascii?Q?tmVNeFfZlu/ck9tpORFua5fK+M+GEPpPGZ22pmESrdfHL4QN8K6hDNuaboNZ?= =?us-ascii?Q?l88tD2f4FsQxLaT3ZcjZ4QWmVUaVmRqhEkFvc0Zbf/+lvw73AplRB9W0NBb8?= =?us-ascii?Q?SFNqF8+k8351V8P5y0d3zDG8wl2/8vIDCH3FdzudMUGKJMNH3V5mIE01+2rt?= =?us-ascii?Q?bT/qqLUN2K3lvtCqoC2yhluciKhd1EzY8dBu/KbC7cQcFA9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OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 11:01:47.8076 (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 Reviewed-by: Peter Chen --- drivers/usb/host/ehci-platform.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a268d9e..3214300 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,7 @@ static int ehci_platform_probe(struct platform_device *dev) goto err_power; device_wakeup_enable(hcd->self.controller); + device_enable_async_suspend(hcd->self.controller); platform_set_drvdata(dev, hcd); return err; @@ -370,6 +372,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 +380,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; }