From: Roger Quadros <rogerq@ti.com>
To: <balbi@kernel.org>
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: Re: [PATCH] usb: dwc3: core: Don't try to get PHYs during suspend/resume
Date: Wed, 10 Jan 2018 15:24:52 +0200 [thread overview]
Message-ID: <0c2c7e45-9324-316a-d44b-dd17a3a2c68b@ti.com> (raw)
In-Reply-To: <1515589914-23460-1-git-send-email-rogerq@ti.com>
Felipe,
On 10/01/18 15:11, Roger Quadros wrote:
> The USB PHYs should be requested only once during the life cycle of
> this driver.
>
> As dwc3_core_init() is called during system suspend/resume
> it will result in multiple calls to dwc3_core_get_phy() which is wrong.
>
> To prevent that let's move dwc3_core_get_phy() call
> outside dwc3_core_init().
>
> Fixes: 541768b08a4 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys")
> Cc: linux-stable <stable@vger.kernel.org> # >= v4.13
> Signed-off-by: Roger Quadros <rogerq@ti.com>
FYI. this patch brings the code back to
revert 541768b08a40 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys")
revert f54edb539c11 ("usb: dwc3: core: initialize ULPI before trying to get the PHY")
So looks like this will break ULPI PHY case?
Where do we initialize ULPI PHY, in dwc3_phy_setup()?
if so then 541768b08a40 breaks the ULPI PHY case as well, right?
> ---
> drivers/usb/dwc3/core.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 0783250..1274251 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -722,8 +722,6 @@ static void dwc3_core_setup_global_control(struct dwc3 *dwc)
> dwc3_writel(dwc->regs, DWC3_GCTL, reg);
> }
>
> -static int dwc3_core_get_phy(struct dwc3 *dwc);
> -
> /**
> * dwc3_core_init - Low-level initialization of DWC3 Core
> * @dwc: Pointer to our controller context structure
> @@ -754,10 +752,6 @@ static int dwc3_core_init(struct dwc3 *dwc)
> dwc->maximum_speed = USB_SPEED_HIGH;
> }
>
> - ret = dwc3_core_get_phy(dwc);
> - if (ret)
> - goto err0;
> -
> ret = dwc3_core_soft_reset(dwc);
> if (ret)
> goto err0;
> @@ -1177,6 +1171,10 @@ static int dwc3_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, dwc);
> dwc3_cache_hwparams(dwc);
>
> + ret = dwc3_core_get_phy(dwc);
> + if (ret)
> + goto err0;
> +
> spin_lock_init(&dwc->lock);
>
> pm_runtime_set_active(dev);
>
--
cheers,
-roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-01-10 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 13:11 Roger Quadros
2018-01-10 13:24 ` Roger Quadros [this message]
2018-01-10 13:33 ` Felipe Balbi
2018-01-10 13:56 ` Roger Quadros
2018-01-10 14:04 ` Felipe Balbi
2018-01-10 14:13 ` Roger Quadros
2018-01-11 8:25 ` Felipe Balbi
2018-01-11 9:09 ` Roger Quadros
2018-01-11 9:23 ` Roger Quadros
2018-01-11 9:31 ` Felipe Balbi
2018-01-11 9:46 ` 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=0c2c7e45-9324-316a-d44b-dd17a3a2c68b@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®