All of lore.kernel.org
 help / color / mirror / Atom feed
* [1/1] usb: chipidea: host: fix disconnection detect issue
@ 2018-06-06 19:54 Martin Blumenstingl
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2018-06-06 19:54 UTC (permalink / raw)
  To: Peter Chen, mats.dev.list; +Cc: linux-usb, linux-imx

Hi Peter, Hi Mats,

On Wed, Jun 6, 2018 at 4:04 AM, Peter Chen <peter.chen@nxp.com> wrote:
> The commit 4e88d4c08301 ("usb: add a flag to skip PHY
> initialization to struct usb_hcd") delete the assignment
> for hcd->usb_phy, it causes usb_phy_notify_connect{disconnect)
> are not called, the USB PHY driver is not notified of hot plug
> event, then the disconnection will not be detected by hardware.
ouch, I totally missed that
thank you for taking time for bisecting, debugging and fixing this!

> Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization
>         to struct usb_hcd")
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reported-by: Mats Karrman <mats.dev.list@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
>  drivers/usb/chipidea/host.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index af45aa3222b5..4638d9b066be 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -124,8 +124,11 @@ 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 || ci->usb_phy)
> +       if (ci->phy || ci->usb_phy) {
>                 hcd->skip_phy_initialization = 1;
> +               if (ci->usb_phy)
> +                       hcd->usb_phy = ci->usb_phy;
> +       }
>
>         ehci = hcd_to_ehci(hcd);
>         ehci->caps = ci->hw_bank.cap;
> --
> 2.14.1
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [1/1] usb: chipidea: host: fix disconnection detect issue
@ 2018-06-06  7:27 Mats Karrman
  0 siblings, 0 replies; 3+ messages in thread
From: Mats Karrman @ 2018-06-06  7:27 UTC (permalink / raw)
  To: Peter Chen, linux-usb; +Cc: linux-imx, Martin Blumenstingl

On 2018-06-06 04:04, Peter Chen wrote:

> The commit 4e88d4c08301 ("usb: add a flag to skip PHY
> initialization to struct usb_hcd") delete the assignment
> for hcd->usb_phy, it causes usb_phy_notify_connect{disconnect)
> are not called, the USB PHY driver is not notified of hot plug
> event, then the disconnection will not be detected by hardware.
>
> Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization
> 	to struct usb_hcd")
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reported-by: Mats Karrman <mats.dev.list@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Works for me!
Tested on SolidRun Hummingboard fsl,imx6dl

Tested-by: Mats Karrman <mats.dev.list@gmail.com>

Thanks,
Mats

> ---
>   drivers/usb/chipidea/host.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index af45aa3222b5..4638d9b066be 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -124,8 +124,11 @@ 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 || ci->usb_phy)
> +	if (ci->phy || ci->usb_phy) {
>   		hcd->skip_phy_initialization = 1;
> +		if (ci->usb_phy)
> +			hcd->usb_phy = ci->usb_phy;
> +	}
>   
>   	ehci = hcd_to_ehci(hcd);
>   	ehci->caps = ci->hw_bank.cap;
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [1/1] usb: chipidea: host: fix disconnection detect issue
@ 2018-06-06  2:04 Peter Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Chen @ 2018-06-06  2:04 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-imx, Peter Chen, Martin Blumenstingl

The commit 4e88d4c08301 ("usb: add a flag to skip PHY
initialization to struct usb_hcd") delete the assignment
for hcd->usb_phy, it causes usb_phy_notify_connect{disconnect)
are not called, the USB PHY driver is not notified of hot plug
event, then the disconnection will not be detected by hardware.

Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization
	to struct usb_hcd")
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reported-by: Mats Karrman <mats.dev.list@gmail.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/chipidea/host.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index af45aa3222b5..4638d9b066be 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -124,8 +124,11 @@ 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 || ci->usb_phy)
+	if (ci->phy || ci->usb_phy) {
 		hcd->skip_phy_initialization = 1;
+		if (ci->usb_phy)
+			hcd->usb_phy = ci->usb_phy;
+	}
 
 	ehci = hcd_to_ehci(hcd);
 	ehci->caps = ci->hw_bank.cap;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-06 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 19:54 [1/1] usb: chipidea: host: fix disconnection detect issue Martin Blumenstingl
  -- strict thread matches above, loose matches on Subject: below --
2018-06-06  7:27 Mats Karrman
2018-06-06  2:04 Peter Chen

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.