From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>
Cc: vigneshr@ti.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
"linux-stable # = v4 . 13" <stable@vger.kernel.org>
Subject: [v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume
Date: Mon, 12 Feb 2018 10:45:20 +0200 [thread overview]
Message-ID: <874lmmbnq7.fsf@linux.intel.com> (raw)
Roger Quadros <rogerq@ti.com> 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 initializing 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 initializing phys")
> Fixes: f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to get the PHY")
> Cc: linux-stable <stable@vger.kernel.org> # >= v4.13
> Signed-off-by: Roger Quadros <rogerq@ti.com>
unfortunately, this doesn't apply anymore. Care to rebase on
testing/fixes? (give me a couple hours though, I'm still applying
patches :-)
cheers
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>
Cc: vigneshr@ti.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Roger Quadros <rogerq@ti.com>,
"linux-stable # \= v4 . 13" <stable@vger.kernel.org>
Subject: Re: [PATCH v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume
Date: Mon, 12 Feb 2018 10:45:20 +0200 [thread overview]
Message-ID: <874lmmbnq7.fsf@linux.intel.com> (raw)
In-Reply-To: <1515667087-4110-1-git-send-email-rogerq@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
Roger Quadros <rogerq@ti.com> 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 initializing 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 initializing phys")
> Fixes: f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to get the PHY")
> Cc: linux-stable <stable@vger.kernel.org> # >= v4.13
> Signed-off-by: Roger Quadros <rogerq@ti.com>
unfortunately, this doesn't apply anymore. Care to rebase on
testing/fixes? (give me a couple hours though, I'm still applying
patches :-)
cheers
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2018-02-12 8:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 8:45 Felipe Balbi [this message]
2018-02-12 8:45 ` [PATCH v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2018-11-27 8:59 [v2,RESEND] " Felipe Balbi
2018-11-27 8:59 ` [PATCH v2 RESEND] " Felipe Balbi
2018-11-26 17:14 [v2,RESEND] " Todor Tomov
2018-11-26 17:14 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-26 8:27 [v2,RESEND] " Todor Tomov
2018-11-26 8:27 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-16 17:01 [v2,RESEND] " Todor Tomov
2018-11-16 17:01 ` [PATCH v2 RESEND] " Todor Tomov
2018-11-15 8:09 [v2,RESEND] " Felipe Balbi
2018-11-15 8:09 ` [PATCH v2 RESEND] " Felipe Balbi
2018-11-14 16:11 [v2,RESEND] " Todor Tomov
2018-11-14 16:11 ` [PATCH v2 RESEND] " Todor Tomov
2018-02-12 13:30 [v2,RESEND] " Roger Quadros
2018-02-12 13:30 ` [PATCH v2 RESEND] " Roger Quadros
2018-01-11 10:38 [v2] " Roger Quadros
2018-01-11 10:38 ` [PATCH v2] " Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lmmbnq7.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.