From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com ([134.134.136.100]:26817 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932504AbeBLIpt (ORCPT ); Mon, 12 Feb 2018 03:45:49 -0500 From: Felipe Balbi To: Roger Quadros Cc: vigneshr@ti.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros , "linux-stable # \= v4 . 13" Subject: Re: [PATCH v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume In-Reply-To: <1515667087-4110-1-git-send-email-rogerq@ti.com> References: <1515667087-4110-1-git-send-email-rogerq@ti.com> Date: Mon, 12 Feb 2018 10:45:20 +0200 Message-ID: <874lmmbnq7.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Roger Quadros writes: > In order for ULPI PHYs to work, dwc3_phy_setup() and dwc3_ulpi_init() > must be doene before dwc3_core_get_phy(). > > commit 541768b08a40 ("usb: dwc3: core: Call dwc3_core_get_phy() before in= itializing phys") > broke this. > > The other issue is that dwc3_core_get_phy() and dwc3_ulpi_init() should > be called only once during the life cycle of the driver. However, > as dwc3_core_init() is called during system suspend/resume it will > result in multiple calls to dwc3_core_get_phy() and dwc3_ulpi_init() > which is wrong. > > Fix this by moving dwc3_ulpi_init() out of dwc3_phy_setup() > into dwc3_core_ulpi_init(). Use a flag 'ulpi_ready' to ensure that > dwc3_core_ulpi_init() is called only once from dwc3_core_init(). > > Use another flag 'phys_ready' to call dwc3_core_get_phy() only once from > dwc3_core_init(). > > Fixes: 541768b08a40 ("usb: dwc3: core: Call dwc3_core_get_phy() before in= itializing phys") > Fixes: f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to g= et the PHY") > Cc: linux-stable # >=3D v4.13 > Signed-off-by: Roger Quadros unfortunately, this doesn't apply anymore. Care to rebase on testing/fixes? (give me a couple hours though, I'm still applying patches :-) cheers =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlqBVCAACgkQzL64meEa mQZnbhAAhJwu9qYh+550QthSdNh5letUqGKOSFfhkylqo3H70VDZK6qNEWJikHrr k3cjjQGUGXNq18gsRtVwjDBHg2eITqFxm2q12uU6zV/k4cLj3goiWk0qD2Xwfl3M Hsk4MD3KD2mJr8oVxdBV2iZvQj4+AZb7B5aQkSh8TcKgOMljySx/kopIm3eFteLO yr5ClgCr6V8s7j+2vpEyK2NoI1/R8TJzrsIiK3+bj2UkxvRCkWKe8k/DPWE8UIys w34fyqq3sRDmu6PEKkWMO48zXzGzB+qKCmnkQ7XDEqxgiPlG1cz0tsZdSfsg+zQh iFRH8Dgjym0vAdk81yWsUfQSEfJvaaIGSaTVufl/iG6+b5+Vq7f3h0jaL67ibZcA 5AXShES1NSfr8ZU6cqVqyz4ievqsuj7kc59dFYcDjydhF4OGcfkLbB+Kp2fQ0YUo lI2DwuCXMvGbLZHNqaN/HPTmJ6Lo64QNsVOJQS33Tq9WbNv/SQghowUG89TbgmPe higfI+1SViDomaUq+6cIni47J3dv9IUsF+Vaz0V1wOhzxL//Xrai0B6MEt1KUgP+ BBC/snwIvlg5TfDr8SXYkJb2dViDawNgMLKjgy9xIIEAQZ+GO1PVPuZ9JA6Kw+Si 1q2xFmNkeArKOt50KnuKiIfFxtSbBc3AS5WCn717z7/p8+dk1G8= =ojeh -----END PGP SIGNATURE----- --=-=-=--