From patchwork Mon Mar 13 06:25:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9619849 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 804C760414 for ; Mon, 13 Mar 2017 06:27:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E86628445 for ; Mon, 13 Mar 2017 06:27:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6028628455; Mon, 13 Mar 2017 06:27:39 +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 D0CFA28445 for ; Mon, 13 Mar 2017 06:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751152AbdCMG1g (ORCPT ); Mon, 13 Mar 2017 02:27:36 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:53413 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750752AbdCMG1f (ORCPT ); Mon, 13 Mar 2017 02:27:35 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 13 Mar 2017 15:27:32 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id A50C2659FE; Mon, 13 Mar 2017 15:27:32 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 8717280030; Mon, 13 Mar 2017 15:27:32 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 78BD98002F; Mon, 13 Mar 2017 15:27:32 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id RAG32015; Mon, 13 Mar 2017 15:27:32 +0900 X-IronPort-AV: E=Sophos;i="5.36,157,1486393200"; d="scan'208";a="236495426" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 13 Mar 2017 15:27:31 +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=KyRj68DBJm8ddm5CEvYZuafRCQ3bopPgmezR4kdwXrE=; b=KN4p4+edWdBc5wpthU0POZR13h/tudKL1VvG+Whhoa8xmXG4XiKACIKolAhN39KH3D8dN+hGkh4kqCvowIvGUefIdfp3PIBb9nbzpYbIpJPb4yerZ85uOLbRYOIbi0QvX0DBxZtnIQt24UXjq336yBHpyZNp8RXSz4gqEnzhKvY= Authentication-Results: rowland.harvard.edu; dkim=none (message not signed) header.d=none; rowland.harvard.edu; dmarc=none action=none header.from=renesas.com; Received: from localhost.localdomain (211.11.155.144) by HK2PR06MB1684.apcprd06.prod.outlook.com (10.167.73.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Mon, 13 Mar 2017 06:27:30 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH v2 1/2] usb: host: ehci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd() Date: Mon, 13 Mar 2017 15:25:23 +0900 Message-ID: <1489386324-31353-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489386324-31353-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1489386324-31353-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSXPR01CA0037.jpnprd01.prod.outlook.com (10.167.143.148) To HK2PR06MB1684.apcprd06.prod.outlook.com (10.167.73.10) X-MS-Office365-Filtering-Correlation-Id: 7bd74ef9-1fa0-40ae-d047-08d469da071f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:HK2PR06MB1684; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1684; 3:3UHaeM/U3qJsmxE3uE6xZPIEEnrjfK3hBQ5s1vdGfRMcBwoGH5OZZwJNIn4KoPL8y1Aje1F2zhNjVqGUgCWPnUSuDkhiaejlykNastwjh7sV6N05QZkNVUX5u9uuVW3w3oevtKidmWTHkTNBprk1j/PQrqVOfIZL+B2u+4sN1c1CCz1EKL09OrpX+cQGR5H+oHNHPTs8qsX7IHS0MbHgtVLaHvfzq7PxY1z0BbY89aF5QWFMZDnjxL6ZMhvuxiNLkg6B0aWtnxAn3Fg5rg9cU26JyHrX/5UMPcLb624aw9M=; 25:drjdQYkTng3I/x98s/Ev7bkieEMl1HVVimt8ESdU34OvNDr1NdR2yCQMkNLnMkyWLuhQaCz5xBDjYgk3o2rdu5QWNloCDXsHGeVyqoovTXRYg7V3G6MTv4pgvHr780p5m7Re0Bcgyn52S8B5p/DWGeaAeZHwGE0kvu1Djg+7wmOBIYUIYiI72ppjsmDYa6gGVVsUUw1MDvN/QX+mmpBjtDjCQfKuXTf8cF/4wWICEkPuvv69xgCN/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-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(6072148); SRVR:HK2PR06MB1684; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1684; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1684; 4:oXzfOz9SuoFyJX3wCsuFMWm7VqvUYU+ulOtYkZSFA4jLo3jsZLJ8twqnDRmc9hoVcPImRXhUCP5MhGLUWavjsRseD32v4/gaOqCE89HZ+mj/xbPAh0UVUPNUytSW5ej0i1z/KIh10Ixlfrui/fsJLa3x9Bs3nye5ApsvjFIQktmrfOfRzL7pV8CM9PkhqKb2KvwQoDdQJJEpldOfCNCmnBPCFYQIy/Z35oji5poir41I0e5HFBDoHY1c3Z9icCv/HYMRO0+1V7QhhT85s05hZvNtRAGDhqssE8eFYmA8H/VXi8euq8Q+vmmJog3irMIl5mEwys87MTmRQif7EjFPHoT1T1j1VzppjSFtqG+wSOX7UGzgGpYFm7+UjBko+rcvUFAhv21qPqcgl8JHO8UZ4V8hcVmvzl9FA2AeYkedZZYcngWag+DfgsWndrVp6pE74a04cIOpFgBQ/qX1xBSvi//6bTbX2T8tS5RhYYQFZa/ESws36T112/vKfTfHXEcplTF06JX7S/xmxK6fJHxd8xjbdCFpp4HfwRczLq0axrbT8qEt9jx8cjBZu7Yfo5W6fp0kaFHTcLvukeOqzT+CZduRE1A2xIFeTzG7KRqmZmeWjvb+6lIEb06Q5s1gxhCC X-Forefront-PRVS: 0245702D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(39840400002)(39860400002)(39450400003)(39410400002)(39850400002)(48376002)(33646002)(42882006)(66066001)(2171002)(107886003)(6666003)(50466002)(50226002)(2950100002)(50986999)(7736002)(5003940100001)(76176999)(5660300001)(36756003)(305945005)(53936002)(4326008)(6506006)(6486002)(78352004)(25786008)(54906002)(6512007)(3846002)(47776003)(8676002)(81166006)(189998001)(42186005)(2906002)(6116002)(38730400002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1684; H:localhost.localdomain; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1684; 23:lH1eO/2FcZyB+2HOkZ2CNhhnVaQI0p3Hw+qbASDkq?= =?us-ascii?Q?zjk5bk2d8Bff9Sge7nOaGVuBngHd75l+lVaw9vr+8gnKCyE1nyuVw/fRYoYv?= =?us-ascii?Q?4VLPMNG7xrUUmarDEkrDiFu78bQDuLGPbKMyxqq2dyNb3tou1NEJQ3SDPknv?= =?us-ascii?Q?vLFOhY71pdQ68yj+wNtqfwWdTrSoNEnwfIfsLDh+0NfCYDERHhrw9Ayd0eyi?= =?us-ascii?Q?/B8AB2ewSu9kndWoHDfeShD88uUAXe7hgHU5R0udgwzA4XYT6sDspYyPL+AP?= =?us-ascii?Q?g3dh2JV08EIrnZYl2sgsGQiH5US+aA2FKRwsN+8iZsefSTF6UT32F/TQSazS?= =?us-ascii?Q?Rf/ySmBdbGGBe9RkDbGYG6ZhH24vv2vWbwMjiQfNtHMqc1ozKYNbhKISwUQv?= =?us-ascii?Q?M46Nqp7uHdapNU/MBX/xCwDNLvaJzACXrQuF6oQSMTkC05ILVYpo8ai5x1Z6?= =?us-ascii?Q?dZi9GBOO0hwoRESplzox2u+hb66bndwBLNv38IWLpjZePuMkVlovleV5xk2L?= =?us-ascii?Q?gVzdGhscHEUjWX2mtGsbJ7WkNK/7lcueH6j1BuKPx4rHA8J8kYRdFn0QOVEO?= =?us-ascii?Q?J5Cgfereg0o7DZC6DJR+1fUxJSO7S1AbpR/Z9iFY4EQahGtLJ/EHi2t/tTbo?= =?us-ascii?Q?z6Rxiy0yZHeBCPe8QX74DWMmqLHucnCmswyPzy8ylKhIlRLdhvc2QmQJ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EuhFDQ==; 24:E0sl6kYEGDFI8aEyucHZ99vIJXf8NzoJCNxV2HGLQKhsfQ0I2an0AMwz3NDXxEwjoEVe9XvLVZPmdrCKr/pXBX2+SxPCyVZexKz9UWnTLXY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1684; 7:8BV3HY7+vif58SChkp69qiJD97Pl8ef0Zoh5NcRzCMMNK4RuA+iguLYIJlftIGFc3RurV73SoL18XGKvP0hKrRvv5QhJO79vEly7clTbe/Sw6sdFoWvsTAkPrFu4tYzNgEQc+9lsK7ZwKlA86Z6hkPOAUOrYMSc/cwYnpSSpuPrNGpkjIRK/WwwUEsjstl7e8PFxwqrwgR9+znwBYB5ELmh2tDoK1WgWsomuD7BZ1IPmoN3JPtYzZvTgQWLd9m2nBgY5ihHUidbhBMxcO8p9OjLARCvxpAHYZkEHTKlC2yy46rLZAfRE0AwK1BbbEa/UDITVnBuTpzyts/hcuDACUA==; 20:FZTuwoT0O3gnbRED4sBXpweyL/WUUDjLybfGZZxfo7aR3uXejy7rvARykWYKMVkwXOKcKLK3Nfk4mSxPrHPs6Zv2PK8lyphkpOyQPty5y1dpF4nCPIf9094dhe5oAOtYeK5L1wY99T6DGuYfFpSAe0ei+sB5NAsBqM2pldDdSsk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 06:27:30.4082 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1684 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 sets hcd->phy from own phy context to avoid phy_get() in usb_add_hcd(). Since core/hcd.c manages the phy only in usb_add_hcd() and usb_remove_hcd(), there is difficult to manage the phy in suspend/resume. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/ehci-platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a268d9e..2a7b6cb 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -220,6 +220,9 @@ static int ehci_platform_probe(struct platform_device *dev) if (IS_ERR(priv->phys[phy_num])) { err = PTR_ERR(priv->phys[phy_num]); goto err_put_hcd; + } else if (!hcd->phy) { + /* Avoiding phy_get() in usb_add_hcd() */ + hcd->phy = priv->phys[phy_num]; } }