From: Mats Karrman <mats.dev.list@gmail.com>
To: Peter Chen <peter.chen@nxp.com>,
"martin.blumenstingl@googlemail.com"
<martin.blumenstingl@googlemail.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Regression caused by: usb: add a flag to skip PHY initialization to struct usb_hcd
Date: Wed, 6 Jun 2018 01:00:24 +0200 [thread overview]
Message-ID: <d22e816c-0166-fa12-efc0-a9016acec638@gmail.com> (raw)
On 2018-06-05 02:54, Peter Chen wrote:
>
>>>> And this is what the "decompiled" device tree entry for the USB
>>>> controller and phy look like:
>>>>
>>>> usb@2184200 {
>>>> compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
>>>> reg = <0x2184200 0x200>;
>>>> interrupts = <0x0 0x28 0x4>;
>>>> clocks = <0x4 0xa2>;
>>>> fsl,usbphy = <0x2c>;
>>>> fsl,usbmisc = <0x29 0x1>;
>>>> dr_mode = "host";
>>>> ahb-burst-config = <0x0>;
>>>> tx-burst-size-dword = <0x10>;
>>>> rx-burst-size-dword = <0x10>;
>>>> status = "okay";
>>>> disable-over-current;
>>>> vbus-supply = <0x2d>;
>>>> };
>>>>
>>>> usbphy@20ca000 {
>>>> compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
>>>> reg = <0x20ca000 0x1000>;
>>>> interrupts = <0x0 0x2d 0x4>;
>>>> clocks = <0x4 0xb7>;
>>>> fsl,anatop = <0x2>;
>>>> phandle = <0x2c>;
>>>> };
>>>>
>>>> So, using deprecated? "fsl,usbphy" instead of "phys", in case that matters.
>>>>
>>> It is ok.
>>>
>>> Check two things:
>>> - ci->usb_phy is non-NULL, and ci->phy is NULL
>> That is correct
>>
>>> - phy_roothub is NULL at the functions of drivers/usb/core/phy.c
>> I put a trace at the beginning of each of the functions of that file but none of them is
>> ever called.
>>
> It is so strange. Please double confirm your git bisect is correct, if it is, try to find which
> line causes your regression.
Bisect confirmed.
Admittedly without really understanding everything that is going on, I put
back the deleted lines from this patch chunk and it started working again:
Without a value in hcd->usb_phy, the call to usb_phy_notify_disconnect()
in hub_port_connect() (usb/core/hub.c) never fires but that is only part of the
problem. Hope this helps.
BR // Mats
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 19d60ed..af45aa32 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -124,10 +124,8 @@ static int host_start(struct ci_hdrc *ci)
hcd->power_budget = ci->platdata->power_budget;
hcd->tpl_support = ci->platdata->tpl_support;
- if (ci->phy)
- hcd->phy = ci->phy;
- else
- hcd->usb_phy = ci->usb_phy;
+ if (ci->phy || ci->usb_phy)
+ hcd->skip_phy_initialization = 1;
ehci = hcd_to_ehci(hcd);
ehci->caps = ci->hw_bank.cap;
next reply other threads:[~2018-06-05 23:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 23:00 Mats Karrman [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-06-06 2:10 Regression caused by: usb: add a flag to skip PHY initialization to struct usb_hcd Peter Chen
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=d22e816c-0166-fa12-efc0-a9016acec638@gmail.com \
--to=mats.dev.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=peter.chen@nxp.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;
as well as URLs for NNTP newsgroup(s).