Received: by 10.223.185.116 with SMTP id b49csp1924892wrg; Mon, 12 Feb 2018 00:54:35 -0800 (PST) X-Google-Smtp-Source: AH8x226BQGbFvzC+a1G9BGFVDRxnQADSEOl69omae/3YBZs2zkx80AciGPzz32icX+BWdAPfQubW X-Received: by 2002:a17:902:208:: with SMTP id 8-v6mr10197474plc.359.1518425675553; Mon, 12 Feb 2018 00:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518425675; cv=none; d=google.com; s=arc-20160816; b=H5AHaPLBKpEzJ38KoYrgXZ3inksueAcdRT5jv9ct0+lDKL09XuCl45kPMBRJQk456v 0ueFz7q36xFBg3h+DXqfTgOHLFHk0ZrmPfK2VZyksTwcKvgCMkvHTO8K8x6WtJ76/I3g 1v2shHEkdzKzwTG61FbgWuwP2FD09z42G8TXwbHudQn7Yeq2BdZPrLL9ppVCkVAbQEIu rHw5ML41ZzJXYK9UbzapqamVtU/0xoSO7pSjbZpwbwQUyXjAq/xSXtWisJXrb6YC/O5u 4z5ZA+6Oj+IfG7+dhgafCo/23pd55sgKsYWF9PG3nxL/XdBGdnYFKnHYzUilBVyJi/tc OLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=Nq6wHHU5P3Ztu1AdOLUw5JTCHCVDp9mtzNrjEo5MVHE=; b=G33AMGqugBHP55YcZfUtJeOTDg79NNXgxvAYdGNJTKcySJSeckAdqGIyw26qjcTjrF 0LUfi9EREOnR+N1SWxLJU1NAZ/y7VrRmxznh7glrVwuPFIMiQBDGIEp43ZpFsRw7lDVB DP1wGzDJ0KS2fPENVtK1zbveSk+rUXEQPUILGma28vlgyk6EIq0RDY/B59fasV2NpODV i+brtm4P6V4s1+Wku3ADQSWsg/nhKeqq0lJiIXdXt8OfkhQ/SXyF0/P2wXGAaDKrVcde P1g2WCuNnTMJ7hnh3LW80Cz0qf0JSYylykvPW6ibOQXGZuL108Td6CqcL5uaLTYq/UEd V8Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si3325962pgv.29.2018.02.12.00.54.21; Mon, 12 Feb 2018 00:54:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932886AbeBLIpv (ORCPT + 99 others); Mon, 12 Feb 2018 03:45:51 -0500 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 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2018 00:45:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,501,1511856000"; d="asc'?scan'208";a="29313401" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.68.37]) by fmsmga004.fm.intel.com with ESMTP; 12 Feb 2018 00:45:46 -0800 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= 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----- --=-=-=--