* [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
@ 2023-06-27 16:20 Jisheng Zhang
2023-06-30 22:23 ` Thinh Nguyen
2023-09-30 7:43 ` Lu jicong
0 siblings, 2 replies; 14+ messages in thread
From: Jisheng Zhang @ 2023-06-27 16:20 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel
Commit c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on
system_suspend in host mode") replaces check for HOST only dr_mode with
current_dr_role. But during booting, the current_dr_role isn't
initialized, thus the device side reset is always issued even if dwc3
was configured as host-only. What's more, on some platforms with host
only dwc3, aways issuing device side reset by accessing device register
block can cause kernel panic.
Fixes: c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/usb/dwc3/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7b2ce013cc5b..16d7a1d1cbfa 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -277,9 +277,9 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
/*
* We're resetting only the device side because, if we're in host mode,
* XHCI driver will reset the host block. If dwc3 was configured for
- * host-only mode, then we can return early.
+ * host-only mode or current role is host, then we can return early.
*/
- if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
+ if (dwc->dr_mode == USB_DR_MODE_HOST || dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
return 0;
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
--
2.40.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-06-27 16:20 [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only Jisheng Zhang
@ 2023-06-30 22:23 ` Thinh Nguyen
2023-09-30 7:43 ` Lu jicong
1 sibling, 0 replies; 14+ messages in thread
From: Thinh Nguyen @ 2023-06-30 22:23 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Thinh Nguyen, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
On Wed, Jun 28, 2023, Jisheng Zhang wrote:
> Commit c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on
> system_suspend in host mode") replaces check for HOST only dr_mode with
> current_dr_role. But during booting, the current_dr_role isn't
> initialized, thus the device side reset is always issued even if dwc3
> was configured as host-only. What's more, on some platforms with host
> only dwc3, aways issuing device side reset by accessing device register
> block can cause kernel panic.
>
Ah... good catch!
This should be backported to stable.
So perhaps you or Greg can add Cc: stable@vger.kernel.org
> Fixes: c4a5153e87fd ("usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode")
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> drivers/usb/dwc3/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 7b2ce013cc5b..16d7a1d1cbfa 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -277,9 +277,9 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
> /*
> * We're resetting only the device side because, if we're in host mode,
> * XHCI driver will reset the host block. If dwc3 was configured for
> - * host-only mode, then we can return early.
> + * host-only mode or current role is host, then we can return early.
> */
> - if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
> + if (dwc->dr_mode == USB_DR_MODE_HOST || dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
> return 0;
>
> reg = dwc3_readl(dwc->regs, DWC3_DCTL);
> --
> 2.40.1
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-06-27 16:20 [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only Jisheng Zhang
2023-06-30 22:23 ` Thinh Nguyen
@ 2023-09-30 7:43 ` Lu jicong
1 sibling, 0 replies; 14+ messages in thread
From: Lu jicong @ 2023-09-30 7:43 UTC (permalink / raw)
To: jszhang; +Cc: Thinh.Nguyen, gregkh, linux-kernel, linux-usb, Lu jicong
It seems that this patch causes driver failed to initialize on rockchip rk3399 devices
when DWC3 controller is configured as dual role.
[ 2.827119] dwc3 fe900000.usb: error -ETIMEDOUT: failed to initialize core
[ 2.827881] dwc3: probe of fe900000.usb failed with error -110
After some tests I am preliminarily certain that this patch caused the failure.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
@ 2023-11-16 16:42 Köry Maincent
2023-11-16 16:59 ` Köry Maincent
0 siblings, 1 reply; 14+ messages in thread
From: Köry Maincent @ 2023-11-16 16:42 UTC (permalink / raw)
To: Jisheng Zhang, Thinh Nguyen, Greg Kroah-Hartman, Lu jicong
Cc: linux-usb, linux-kernel, Thomas Petazzoni
Hello,
Similar issue with ZynqMP board related to that patch:
xilinx-psgtr fd400000.phy: lane 3 (type 1, protocol 3): PLL lock timeout
phy phy-fd400000.phy.3: phy poweron failed --> -110
dwc3 fe300000.usb: error -ETIMEDOUT: failed to initialize core
With CONFIG_USB_DWC3_DUAL_ROLE and dr_mode = "host";
It may not be the correct fix.
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-16 16:42 Köry Maincent
@ 2023-11-16 16:59 ` Köry Maincent
2023-11-17 1:40 ` Thinh Nguyen
0 siblings, 1 reply; 14+ messages in thread
From: Köry Maincent @ 2023-11-16 16:59 UTC (permalink / raw)
To: Jisheng Zhang, Thinh Nguyen, Greg Kroah-Hartman, Lu jicong
Cc: linux-usb, linux-kernel, Thomas Petazzoni
On Thu, 16 Nov 2023 17:42:06 +0100
Köry Maincent <kory.maincent@bootlin.com> wrote:
> Hello,
>
> Similar issue with ZynqMP board related to that patch:
>
> xilinx-psgtr fd400000.phy: lane 3 (type 1, protocol 3): PLL lock timeout
> phy phy-fd400000.phy.3: phy poweron failed --> -110
> dwc3 fe300000.usb: error -ETIMEDOUT: failed to initialize core
>
> With CONFIG_USB_DWC3_DUAL_ROLE and dr_mode = "host";
>
> It may not be the correct fix.
Just figured out there was a patch (357191036889 usb: dwc3: Soft reset phy on
probe for host) from Thinh aimed to fix it but the issue is still here on
ZynqMP.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-16 16:59 ` Köry Maincent
@ 2023-11-17 1:40 ` Thinh Nguyen
2023-11-17 1:55 ` Thinh Nguyen
0 siblings, 1 reply; 14+ messages in thread
From: Thinh Nguyen @ 2023-11-17 1:40 UTC (permalink / raw)
To: 20231116174206.1a823aa3@synopsys.com
Cc: Jisheng Zhang, Thinh Nguyen, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
Hi,
On Thu, Nov 16, 2023, Köry Maincent wrote:
> On Thu, 16 Nov 2023 17:42:06 +0100
> Köry Maincent <kory.maincent@bootlin.com> wrote:
>
> > Hello,
> >
> > Similar issue with ZynqMP board related to that patch:
> >
> > xilinx-psgtr fd400000.phy: lane 3 (type 1, protocol 3): PLL lock timeout
> > phy phy-fd400000.phy.3: phy poweron failed --> -110
> > dwc3 fe300000.usb: error -ETIMEDOUT: failed to initialize core
> >
> > With CONFIG_USB_DWC3_DUAL_ROLE and dr_mode = "host";
> >
> > It may not be the correct fix.
>
> Just figured out there was a patch (357191036889 usb: dwc3: Soft reset phy on
> probe for host) from Thinh aimed to fix it but the issue is still here on
> ZynqMP.
>
How many ports do you use? Can you try this:
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 0328c86ef806..9921c2737829 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -296,23 +296,28 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
if (dwc->dr_mode == USB_DR_MODE_HOST) {
u32 usb3_port;
u32 usb2_port;
+ int i;
- usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
- usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
- dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
+ for (i = 0; i < 16; i++) {
+ usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(i));
+ usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
+ dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i), usb3_port);
- usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
- usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
- dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
+ usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(i));
+ usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
+ dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), usb2_port);
+ }
/* Small delay for phy reset assertion */
usleep_range(1000, 2000);
- usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
- dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
+ for (i = 0; i < 16; i++) {
+ usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
+ dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i), usb3_port);
- usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
- dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
+ usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
+ dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), usb2_port);
+ }
/* Wait for clock synchronization */
msleep(50);
---
BR,
Thinh
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-17 1:40 ` Thinh Nguyen
@ 2023-11-17 1:55 ` Thinh Nguyen
2023-11-17 9:22 ` Köry Maincent
2023-11-21 9:49 ` Köry Maincent
0 siblings, 2 replies; 14+ messages in thread
From: Thinh Nguyen @ 2023-11-17 1:55 UTC (permalink / raw)
To: Köry Maincent
Cc: Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
Hi,
Sorry, email client issue with your email. Attempt to resend:
On Fri, Nov 17, 2023, Thinh Nguyen wrote:
> Hi,
>
> On Thu, Nov 16, 2023, Köry Maincent wrote:
> > On Thu, 16 Nov 2023 17:42:06 +0100
> > Köry Maincent <kory.maincent@bootlin.com> wrote:
> >
> > > Hello,
> > >
> > > Similar issue with ZynqMP board related to that patch:
> > >
> > > xilinx-psgtr fd400000.phy: lane 3 (type 1, protocol 3): PLL lock timeout
> > > phy phy-fd400000.phy.3: phy poweron failed --> -110
> > > dwc3 fe300000.usb: error -ETIMEDOUT: failed to initialize core
> > >
> > > With CONFIG_USB_DWC3_DUAL_ROLE and dr_mode = "host";
> > >
> > > It may not be the correct fix.
> >
> > Just figured out there was a patch (357191036889 usb: dwc3: Soft reset phy on
> > probe for host) from Thinh aimed to fix it but the issue is still here on
> > ZynqMP.
> >
>
> How many ports do you use? Can you try this:
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 0328c86ef806..9921c2737829 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -296,23 +296,28 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
> if (dwc->dr_mode == USB_DR_MODE_HOST) {
> u32 usb3_port;
> u32 usb2_port;
> + int i;
>
> - usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
> - usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
> - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
> + for (i = 0; i < 16; i++) {
> + usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(i));
> + usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
> + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i), usb3_port);
>
> - usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
> - usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
> - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
> + usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(i));
> + usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
> + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), usb2_port);
> + }
>
> /* Small delay for phy reset assertion */
> usleep_range(1000, 2000);
>
> - usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
> - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
> + for (i = 0; i < 16; i++) {
> + usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
> + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i), usb3_port);
>
> - usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
> - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
> + usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
> + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i), usb2_port);
> + }
>
> /* Wait for clock synchronization */
> msleep(50);
> ---
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-17 1:55 ` Thinh Nguyen
@ 2023-11-17 9:22 ` Köry Maincent
2023-11-21 9:49 ` Köry Maincent
1 sibling, 0 replies; 14+ messages in thread
From: Köry Maincent @ 2023-11-17 9:22 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
Hello Thinh,
On Fri, 17 Nov 2023 01:55:30 +0000
Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Hi,
>
> Sorry, email client issue with your email. Attempt to resend:
Thanks for your quick reply.
>
> On Fri, Nov 17, 2023, Thinh Nguyen wrote:
> > Hi,
> >
> > On Thu, Nov 16, 2023, Köry Maincent wrote:
> > > On Thu, 16 Nov 2023 17:42:06 +0100
> > > Köry Maincent <kory.maincent@bootlin.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > Similar issue with ZynqMP board related to that patch:
> > > >
> > > > xilinx-psgtr fd400000.phy: lane 3 (type 1, protocol 3): PLL lock timeout
> > > > phy phy-fd400000.phy.3: phy poweron failed --> -110
> > > > dwc3 fe300000.usb: error -ETIMEDOUT: failed to initialize core
> > > >
> > > > With CONFIG_USB_DWC3_DUAL_ROLE and dr_mode = "host";
> > > >
> > > > It may not be the correct fix.
> > >
> > > Just figured out there was a patch (357191036889 usb: dwc3: Soft reset
> > > phy on probe for host) from Thinh aimed to fix it but the issue is still
> > > here on ZynqMP.
> > >
> >
> > How many ports do you use? Can you try this:
I am using 2 ports.
I will test it out next week as I don't have access to the board until then.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-17 1:55 ` Thinh Nguyen
2023-11-17 9:22 ` Köry Maincent
@ 2023-11-21 9:49 ` Köry Maincent
2023-12-01 9:09 ` Köry Maincent
1 sibling, 1 reply; 14+ messages in thread
From: Köry Maincent @ 2023-11-21 9:49 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
Hello Thinh,
On Fri, 17 Nov 2023 01:55:30 +0000
Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> > How many ports do you use? Can you try this:
> >
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > index 0328c86ef806..9921c2737829 100644
> > --- a/drivers/usb/dwc3/core.c
> > +++ b/drivers/usb/dwc3/core.c
> > @@ -296,23 +296,28 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
> > if (dwc->dr_mode == USB_DR_MODE_HOST) {
> > u32 usb3_port;
> > u32 usb2_port;
> > + int i;
> >
> > - usb3_port = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
> > - usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
> > - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
> > + for (i = 0; i < 16; i++) {
> > + usb3_port = dwc3_readl(dwc->regs,
> > DWC3_GUSB3PIPECTL(i));
> > + usb3_port |= DWC3_GUSB3PIPECTL_PHYSOFTRST;
> > + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i),
> > usb3_port);
> > - usb2_port = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
> > - usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
> > - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
> > + usb2_port = dwc3_readl(dwc->regs,
> > DWC3_GUSB2PHYCFG(i));
> > + usb2_port |= DWC3_GUSB2PHYCFG_PHYSOFTRST;
> > + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i),
> > usb2_port);
> > + }
> >
> > /* Small delay for phy reset assertion */
> > usleep_range(1000, 2000);
> >
> > - usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
> > - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), usb3_port);
> > + for (i = 0; i < 16; i++) {
> > + usb3_port &= ~DWC3_GUSB3PIPECTL_PHYSOFTRST;
> > + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(i),
> > usb3_port);
> > - usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
> > - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), usb2_port);
> > + usb2_port &= ~DWC3_GUSB2PHYCFG_PHYSOFTRST;
> > + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(i),
> > usb2_port);
> > + }
> >
> > /* Wait for clock synchronization */
> > msleep(50);
> > --
Still not working on my side.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-11-21 9:49 ` Köry Maincent
@ 2023-12-01 9:09 ` Köry Maincent
2023-12-02 0:26 ` Thinh Nguyen
0 siblings, 1 reply; 14+ messages in thread
From: Köry Maincent @ 2023-12-01 9:09 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
On Tue, 21 Nov 2023 10:49:17 +0100
Köry Maincent <kory.maincent@bootlin.com> wrote:
> Hello Thinh,
>
> On Fri, 17 Nov 2023 01:55:30 +0000
> Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Still not working on my side.
Hello,
Just wondering if you have received my email as you said having client mail
issue.
regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-12-01 9:09 ` Köry Maincent
@ 2023-12-02 0:26 ` Thinh Nguyen
2023-12-05 1:27 ` Thinh Nguyen
2023-12-05 14:19 ` Köry Maincent
0 siblings, 2 replies; 14+ messages in thread
From: Thinh Nguyen @ 2023-12-02 0:26 UTC (permalink / raw)
To: Köry Maincent
Cc: Thinh Nguyen, Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
Hi,
On Fri, Dec 01, 2023, Köry Maincent wrote:
> On Tue, 21 Nov 2023 10:49:17 +0100
> Köry Maincent <kory.maincent@bootlin.com> wrote:
>
> > Hello Thinh,
> >
> > On Fri, 17 Nov 2023 01:55:30 +0000
> > Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
>
> > Still not working on my side.
>
> Hello,
>
> Just wondering if you have received my email as you said having client mail
> issue.
>
Sorry for the delay. Things got busy for me recently.
So your platform has multiple ports. Do you use UTMI or ULPI phy?
I forgot another thing, the phy reset we're doing now doesn't apply to
ULPI phys. We may need to teach HCRST to dwc3, this may not look clean.
Hi Lisheng,
Did you see any reported issue before your change were applied? If not,
perhaps we should revert the changes related to soft-reset for this.
Thanks,
Thinh
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-12-02 0:26 ` Thinh Nguyen
@ 2023-12-05 1:27 ` Thinh Nguyen
2023-12-05 13:56 ` Jisheng Zhang
2023-12-05 14:19 ` Köry Maincent
1 sibling, 1 reply; 14+ messages in thread
From: Thinh Nguyen @ 2023-12-05 1:27 UTC (permalink / raw)
To: Köry Maincent, Jisheng Zhang
Cc: Greg Kroah-Hartman, Lu jicong, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Thomas Petazzoni
On Sat, Dec 02, 2023, Thinh Nguyen wrote:
>
> Hi Lisheng,
Typo, I mean Jisheng.
>
> Did you see any reported issue before your change were applied? If not,
> perhaps we should revert the changes related to soft-reset for this.
>
BR,
Thinh
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-12-05 1:27 ` Thinh Nguyen
@ 2023-12-05 13:56 ` Jisheng Zhang
0 siblings, 0 replies; 14+ messages in thread
From: Jisheng Zhang @ 2023-12-05 13:56 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Köry Maincent, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
On Tue, Dec 05, 2023 at 01:27:56AM +0000, Thinh Nguyen wrote:
>
> On Sat, Dec 02, 2023, Thinh Nguyen wrote:
> >
> > Hi Lisheng,
>
> Typo, I mean Jisheng.
Hi Thinh
>
> >
> > Did you see any reported issue before your change were applied? If not,
> > perhaps we should revert the changes related to soft-reset for this.
> >
It seems this patch brings more issues than solved, I think reverting it is
better.
Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only
2023-12-02 0:26 ` Thinh Nguyen
2023-12-05 1:27 ` Thinh Nguyen
@ 2023-12-05 14:19 ` Köry Maincent
1 sibling, 0 replies; 14+ messages in thread
From: Köry Maincent @ 2023-12-05 14:19 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Jisheng Zhang, Greg Kroah-Hartman, Lu jicong,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Petazzoni
On Sat, 2 Dec 2023 00:26:34 +0000
Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Hi,
>
> On Fri, Dec 01, 2023, Köry Maincent wrote:
> > On Tue, 21 Nov 2023 10:49:17 +0100
> > Köry Maincent <kory.maincent@bootlin.com> wrote:
> >
> > > Hello Thinh,
> > >
> > > On Fri, 17 Nov 2023 01:55:30 +0000
> > > Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> >
> > > Still not working on my side.
> >
> > Hello,
> >
> > Just wondering if you have received my email as you said having client mail
> > issue.
> >
>
> Sorry for the delay. Things got busy for me recently.
>
> So your platform has multiple ports. Do you use UTMI or ULPI phy?
It uses USB3220 ULPI phy.
> I forgot another thing, the phy reset we're doing now doesn't apply to
> ULPI phys. We may need to teach HCRST to dwc3, this may not look clean.
So that is the reason it does not apply for my case.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-12-05 14:20 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 16:20 [PATCH] usb: dwc3: don't reset device side if dwc3 was configured as host-only Jisheng Zhang
2023-06-30 22:23 ` Thinh Nguyen
2023-09-30 7:43 ` Lu jicong
-- strict thread matches above, loose matches on Subject: below --
2023-11-16 16:42 Köry Maincent
2023-11-16 16:59 ` Köry Maincent
2023-11-17 1:40 ` Thinh Nguyen
2023-11-17 1:55 ` Thinh Nguyen
2023-11-17 9:22 ` Köry Maincent
2023-11-21 9:49 ` Köry Maincent
2023-12-01 9:09 ` Köry Maincent
2023-12-02 0:26 ` Thinh Nguyen
2023-12-05 1:27 ` Thinh Nguyen
2023-12-05 13:56 ` Jisheng Zhang
2023-12-05 14:19 ` Köry Maincent
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).