All of lore.kernel.org
 help / color / mirror / Atom feed
* usb: dwc2: disable power_down on rockchip devices
@ 2018-10-21 20:53 Hal Emmerich
  2018-10-26 14:38 ` [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression Hal Emmerich
  0 siblings, 1 reply; 8+ messages in thread
From: Hal Emmerich @ 2018-10-21 20:53 UTC (permalink / raw)
  To: felipe.balbi, linux-usb, hminas

From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
From: Hal Emmerich <hal@halemmerich.com>
Date: Thu, 19 Jul 2018 21:48:08 -0500
Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices

 The bug would let the usb controller enter partial power down,
 which was formally known as hibernate, upon boot if nothing was plugged
 in to the port. Partial power down couldn't be exited properly, so any
 usb devices plugged in after boot would not be usable.

 Before the name change, params.hibernation was false by default, so
 _dwc2_hcd_suspend() would skip entering hibernation. With the
 rename, _dwc2_hcd_suspend() was changed to use  params.power_down
 to decide whether or not to enter partial power down.

 Since params.power_down is non-zero by default, it needs to be set
 to 0 for rockchip devices to restore functionality.

 This bug was reported in the linux-usb thread:
 REGRESSION: usb: dwc2: USB device not seen after boot

 The commit that caused this regression is:
 6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6

Signed-off-by: Hal Emmerich <hal@halemmerich.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
---
 drivers/usb/dwc2/params.c | 1 +
 1 file changed, 1 insertion(+)

--
2.11.0

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index bf7052e037d6..09292dc977e4 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
 	p->host_perio_tx_fifo_size = 256;
 	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
 		GAHBCFG_HBSTLEN_SHIFT;
+	p->power_down = 0;
 }
 
 static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2018-10-26 14:38 ` Hal Emmerich
  2019-04-08 22:48     ` [RESEND,v2] " Doug Anderson
  0 siblings, 1 reply; 8+ messages in thread
From: Hal Emmerich @ 2018-10-26 14:38 UTC (permalink / raw)
  To: felipe.balbi, linux-usb, hminas

From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
From: Hal Emmerich <hal@halemmerich.com>
Date: Thu, 19 Jul 2018 21:48:08 -0500
Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices

 The bug would let the usb controller enter partial power down,
 which was formally known as hibernate, upon boot if nothing was plugged
 in to the port. Partial power down couldn't be exited properly, so any
 usb devices plugged in after boot would not be usable.

 Before the name change, params.hibernation was false by default, so
 _dwc2_hcd_suspend() would skip entering hibernation. With the
 rename, _dwc2_hcd_suspend() was changed to use  params.power_down
 to decide whether or not to enter partial power down.

 Since params.power_down is non-zero by default, it needs to be set
 to 0 for rockchip devices to restore functionality.

 This bug was reported in the linux-usb thread:
 REGRESSION: usb: dwc2: USB device not seen after boot

 The commit that caused this regression is:
 6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6

Signed-off-by: Hal Emmerich <hal@halemmerich.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
---
 drivers/usb/dwc2/params.c | 1 +
 1 file changed, 1 insertion(+)

--
2.11.0

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index bf7052e037d6..09292dc977e4 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
 	p->host_perio_tx_fifo_size = 256;
 	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
 		GAHBCFG_HBSTLEN_SHIFT;
+	p->power_down = 0;
 }
 
 static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)

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

* Re: [RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression
@ 2019-04-08 22:48     ` Doug Anderson
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2019-04-08 22:48 UTC (permalink / raw)
  To: stable
  Cc: Felipe Balbi, linux-usb, Minas Harutyunyan, Hal Emmerich,
	open list:ARM/Rockchip SoC...

Hi,

On Fri, Oct 26, 2018 at 7:38 AM Hal Emmerich <hal@halemmerich.com> wrote:
>
>
> From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
> From: Hal Emmerich <hal@halemmerich.com>
> Date: Thu, 19 Jul 2018 21:48:08 -0500
> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
>
>  The bug would let the usb controller enter partial power down,
>  which was formally known as hibernate, upon boot if nothing was plugged
>  in to the port. Partial power down couldn't be exited properly, so any
>  usb devices plugged in after boot would not be usable.
>
>  Before the name change, params.hibernation was false by default, so
>  _dwc2_hcd_suspend() would skip entering hibernation. With the
>  rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>  to decide whether or not to enter partial power down.
>
>  Since params.power_down is non-zero by default, it needs to be set
>  to 0 for rockchip devices to restore functionality.
>
>  This bug was reported in the linux-usb thread:
>  REGRESSION: usb: dwc2: USB device not seen after boot
>
>  The commit that caused this regression is:
>  6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
>
> Signed-off-by: Hal Emmerich <hal@halemmerich.com>
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>  drivers/usb/dwc2/params.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index bf7052e037d6..09292dc977e4 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>         p->host_perio_tx_fifo_size = 256;
>         p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
>                 GAHBCFG_HBSTLEN_SHIFT;
> +       p->power_down = 0;

This landed as commit c216765d3a1d ("usb: dwc2: disable power_down on
rockchip devices").  Can it please go to stable?  Hotplug of USB on
v4.19 stable, for example, is currently broken due to the lack of this
patch.

Thanks!

-Doug

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2019-04-08 22:48     ` Doug Anderson
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2019-04-08 22:48 UTC (permalink / raw)
  To: stable
  Cc: Felipe Balbi, linux-usb, Minas Harutyunyan, Hal Emmerich,
	open list:ARM/Rockchip SoC...

Hi,

On Fri, Oct 26, 2018 at 7:38 AM Hal Emmerich <hal@halemmerich.com> wrote:
>
>
> From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
> From: Hal Emmerich <hal@halemmerich.com>
> Date: Thu, 19 Jul 2018 21:48:08 -0500
> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
>
>  The bug would let the usb controller enter partial power down,
>  which was formally known as hibernate, upon boot if nothing was plugged
>  in to the port. Partial power down couldn't be exited properly, so any
>  usb devices plugged in after boot would not be usable.
>
>  Before the name change, params.hibernation was false by default, so
>  _dwc2_hcd_suspend() would skip entering hibernation. With the
>  rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>  to decide whether or not to enter partial power down.
>
>  Since params.power_down is non-zero by default, it needs to be set
>  to 0 for rockchip devices to restore functionality.
>
>  This bug was reported in the linux-usb thread:
>  REGRESSION: usb: dwc2: USB device not seen after boot
>
>  The commit that caused this regression is:
>  6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
>
> Signed-off-by: Hal Emmerich <hal@halemmerich.com>
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>  drivers/usb/dwc2/params.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index bf7052e037d6..09292dc977e4 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>         p->host_perio_tx_fifo_size = 256;
>         p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
>                 GAHBCFG_HBSTLEN_SHIFT;
> +       p->power_down = 0;

This landed as commit c216765d3a1d ("usb: dwc2: disable power_down on
rockchip devices").  Can it please go to stable?  Hotplug of USB on
v4.19 stable, for example, is currently broken due to the lack of this
patch.

Thanks!

-Doug

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2018-11-14  9:01 Felipe Balbi
  0 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2018-11-14  9:01 UTC (permalink / raw)
  To: Hal Emmerich, linux-usb, hminas

Hal Emmerich <hal@halemmerich.com> writes:

> From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
> From: Hal Emmerich <hal@halemmerich.com>
> Date: Thu, 19 Jul 2018 21:48:08 -0500
> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
>
>  The bug would let the usb controller enter partial power down,
>  which was formally known as hibernate, upon boot if nothing was plugged
>  in to the port. Partial power down couldn't be exited properly, so any
>  usb devices plugged in after boot would not be usable.
>
>  Before the name change, params.hibernation was false by default, so
>  _dwc2_hcd_suspend() would skip entering hibernation. With the
>  rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>  to decide whether or not to enter partial power down.
>
>  Since params.power_down is non-zero by default, it needs to be set
>  to 0 for rockchip devices to restore functionality.
>
>  This bug was reported in the linux-usb thread:
>  REGRESSION: usb: dwc2: USB device not seen after boot
>
>  The commit that caused this regression is:
>  6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6

What are these weird space characters you're using in your commit log?
I've fixed it locally this time, but please fix your editor.

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2018-11-01  5:42 Minas Harutyunyan
  0 siblings, 0 replies; 8+ messages in thread
From: Minas Harutyunyan @ 2018-11-01  5:42 UTC (permalink / raw)
  To: Hal Emmerich, felipe.balbi, linux-usb, minas.harutyunyan

Hi,

On 10/26/2018 6:38 PM, Hal Emmerich wrote:
> 
>  From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
> From: Hal Emmerich <hal@halemmerich.com>
> Date: Thu, 19 Jul 2018 21:48:08 -0500
> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
> 
>   The bug would let the usb controller enter partial power down,
>   which was formally known as hibernate, upon boot if nothing was plugged
>   in to the port. Partial power down couldn't be exited properly, so any
>   usb devices plugged in after boot would not be usable.
> 
>   Before the name change, params.hibernation was false by default, so
>   _dwc2_hcd_suspend() would skip entering hibernation. With the
>   rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>   to decide whether or not to enter partial power down.
> 
>   Since params.power_down is non-zero by default, it needs to be set
>   to 0 for rockchip devices to restore functionality.
> 
>   This bug was reported in the linux-usb thread:
>   REGRESSION: usb: dwc2: USB device not seen after boot
> 
>   The commit that caused this regression is:
>   6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
> 
> Signed-off-by: Hal Emmerich <hal@halemmerich.com>
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>

Acked-by: Minas Harutyunyan <hminas@synopsys.com> for v2

> ---
>   drivers/usb/dwc2/params.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index bf7052e037d6..09292dc977e4 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>   	p->host_perio_tx_fifo_size = 256;
>   	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
>   		GAHBCFG_HBSTLEN_SHIFT;
> +	p->power_down = 0;
>   }
>   
>   static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)
> --
> 2.11.0
> 
>

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2018-10-31 23:02 Hal Emmerich
  0 siblings, 0 replies; 8+ messages in thread
From: Hal Emmerich @ 2018-10-31 23:02 UTC (permalink / raw)
  To: Minas Harutyunyan, felipe.balbi, linux-usb

On 10/29/18 4:02 AM, Minas Harutyunyan wrote:
> Hi Hal,
> 
> On 10/26/2018 6:38 PM, Hal Emmerich wrote:
>>
>>   From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
>> From: Hal Emmerich <hal@halemmerich.com>
>> Date: Thu, 19 Jul 2018 21:48:08 -0500
>> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
>>
>>    The bug would let the usb controller enter partial power down,
>>    which was formally known as hibernate, upon boot if nothing was plugged
>>    in to the port. Partial power down couldn't be exited properly, so any
>>    usb devices plugged in after boot would not be usable.
>>
>>    Before the name change, params.hibernation was false by default, so
>>    _dwc2_hcd_suspend() would skip entering hibernation. With the
>>    rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>>    to decide whether or not to enter partial power down.
>>
>>    Since params.power_down is non-zero by default, it needs to be set
>>    to 0 for rockchip devices to restore functionality.
>>
>>    This bug was reported in the linux-usb thread:
>>    REGRESSION: usb: dwc2: USB device not seen after boot
>>
>>    The commit that caused this regression is:
>>    6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
>>
>> Signed-off-by: Hal Emmerich <hal@halemmerich.com>
>> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
>> ---
>>    drivers/usb/dwc2/params.c | 1 +
>>    1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
>> index bf7052e037d6..09292dc977e4 100644
>> --- a/drivers/usb/dwc2/params.c
>> +++ b/drivers/usb/dwc2/params.c
>> @@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>>    	p->host_perio_tx_fifo_size = 256;
>>    	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
>>    		GAHBCFG_HBSTLEN_SHIFT;
>> +	p->power_down = 0;
>>    }
>>    
>>    static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)
>> --
>> 2.11.0
>>
> 
> Could you please elaborate. In subject mentioned that it's "v2" patch.
> But looks like its fully same as v1 patch. If not, then where new
> version patch updates description.
> 
> Thanks,
> Minas
> 
>>
> 

Hey Minas,

felipe.balbi@linux.intel.com mentioned that he was unable to apply the original 
patch so I remade the patch, and confirmed I could apply it cleanly to the 
current tree and marked it v2. He also mentioned that I should "collect" your 
ack, which I'm not familiar with. I added:

 >> Acked-by: Minas Harutyunyan <hminas@synopsys.com>

which may or may not be the correct way of doing things. Let me know if I am 
doing that incorrectly. Sorry if I shouldn't have marked this v2.

Also, just to let you know, my mailserver says that your mailserver refuses to 
collect my email. My servers not on any blocklists and seems to send mail 
elsewhere fine so I'm guessing your mailserver has mistakenly categorized me as 
spam on its own. Seems my mail still gets through to you from the list though, 
so not a big deal.

Sorry if I'm not doing some part of this correctly.

Thanks,

Evan

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

* [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression
@ 2018-10-29  9:02 Minas Harutyunyan
  0 siblings, 0 replies; 8+ messages in thread
From: Minas Harutyunyan @ 2018-10-29  9:02 UTC (permalink / raw)
  To: Hal Emmerich, felipe.balbi, linux-usb, minas.harutyunyan

Hi Hal,

On 10/26/2018 6:38 PM, Hal Emmerich wrote:
> 
>  From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
> From: Hal Emmerich <hal@halemmerich.com>
> Date: Thu, 19 Jul 2018 21:48:08 -0500
> Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
> 
>   The bug would let the usb controller enter partial power down,
>   which was formally known as hibernate, upon boot if nothing was plugged
>   in to the port. Partial power down couldn't be exited properly, so any
>   usb devices plugged in after boot would not be usable.
> 
>   Before the name change, params.hibernation was false by default, so
>   _dwc2_hcd_suspend() would skip entering hibernation. With the
>   rename, _dwc2_hcd_suspend() was changed to use  params.power_down
>   to decide whether or not to enter partial power down.
> 
>   Since params.power_down is non-zero by default, it needs to be set
>   to 0 for rockchip devices to restore functionality.
> 
>   This bug was reported in the linux-usb thread:
>   REGRESSION: usb: dwc2: USB device not seen after boot
> 
>   The commit that caused this regression is:
>   6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
> 
> Signed-off-by: Hal Emmerich <hal@halemmerich.com>
> Acked-by: Minas Harutyunyan <hminas@synopsys.com>
> ---
>   drivers/usb/dwc2/params.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index bf7052e037d6..09292dc977e4 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -81,6 +81,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
>   	p->host_perio_tx_fifo_size = 256;
>   	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
>   		GAHBCFG_HBSTLEN_SHIFT;
> +	p->power_down = 0;
>   }
>   
>   static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)
> --
> 2.11.0
> 

Could you please elaborate. In subject mentioned that it's "v2" patch. 
But looks like its fully same as v1 patch. If not, then where new 
version patch updates description.

Thanks,
Minas

>

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

end of thread, other threads:[~2019-04-08 22:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-21 20:53 usb: dwc2: disable power_down on rockchip devices Hal Emmerich
2018-10-26 14:38 ` [RESEND,v2] usb: dwc2: disable power_down on rockchip for regression Hal Emmerich
2019-04-08 22:48   ` [RESEND PATCH v2] " Doug Anderson
2019-04-08 22:48     ` [RESEND,v2] " Doug Anderson
2018-10-29  9:02 Minas Harutyunyan
2018-10-31 23:02 Hal Emmerich
2018-11-01  5:42 Minas Harutyunyan
2018-11-14  9:01 Felipe Balbi

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.