All of lore.kernel.org
 help / color / mirror / Atom feed
* usb: dwc2: disable power_down on rockchip devices
@ 2018-09-13  6:52 Minas Harutyunyan
  0 siblings, 0 replies; 10+ messages in thread
From: Minas Harutyunyan @ 2018-09-13  6:52 UTC (permalink / raw)
  To: Hal Emmerich, linux-usb

On 7/20/2018 7:25 AM, 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>
> ---
>   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 f03e41879224..492607adc506 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -82,6 +82,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
> --
> 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
> 
Acked-by: Minas Harutyunyan <hminas@synopsys.com>

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

* usb: dwc2: disable power_down on rockchip devices
@ 2018-10-21 20:53 Hal Emmerich
  0 siblings, 0 replies; 10+ 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] 10+ messages in thread

* usb: dwc2: disable power_down on rockchip devices
@ 2018-10-03  1:58 Hal Emmerich
  0 siblings, 0 replies; 10+ messages in thread
From: Hal Emmerich @ 2018-10-03  1:58 UTC (permalink / raw)
  To: linux-usb; +Cc: SolidHal

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: SolidHal <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)

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

* usb: dwc2: disable power_down on rockchip devices
@ 2018-10-02  7:35 Felipe Balbi
  0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2018-10-02  7:35 UTC (permalink / raw)
  To: Hal Emmerich, linux-usb

Hi,

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
>
> Signed-off-by: Hal Emmerich <hal@halemmerich.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 f03e41879224..492607adc506 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -82,6 +82,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)

can't apply, badly formatted. Please resend using git send-email. Also
collect Minas' acked-by

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

* usb: dwc2: disable power_down on rockchip devices
@ 2018-10-01  5:55 Minas Harutyunyan
  0 siblings, 0 replies; 10+ messages in thread
From: Minas Harutyunyan @ 2018-10-01  5:55 UTC (permalink / raw)
  To: Hal Emmerich, minas.harutyunyan, linux-usb, arthur.petrosyan

On 9/28/2018 7:05 AM, 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 f03e41879224..492607adc506 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -82,6 +82,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] 10+ messages in thread

* usb: dwc2: disable power_down on rockchip devices
@ 2018-09-28 14:07 Minas Harutyunyan
  0 siblings, 0 replies; 10+ messages in thread
From: Minas Harutyunyan @ 2018-09-28 14:07 UTC (permalink / raw)
  To: Hal Emmerich, minas.harutyunyan, linux-usb, arthur.petrosyan

On 9/28/2018 7:05 AM, 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 f03e41879224..492607adc506 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -82,6 +82,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] 10+ messages in thread

* usb: dwc2: disable power_down on rockchip devices
@ 2018-09-28  2:58 Hal Emmerich
  0 siblings, 0 replies; 10+ messages in thread
From: Hal Emmerich @ 2018-09-28  2:58 UTC (permalink / raw)
  To: hminas, linux-usb

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>
---
 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 f03e41879224..492607adc506 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -82,6 +82,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] 10+ messages in thread

* usb: dwc2: disable power_down on rockchip devices
@ 2018-09-13  6:52 Minas Harutyunyan
  0 siblings, 0 replies; 10+ messages in thread
From: Minas Harutyunyan @ 2018-09-13  6:52 UTC (permalink / raw)
  To: Urja Rannikko, linux-usb

Hi,

On 9/12/2018 7:21 PM, Urja Rannikko wrote:
> Hi, ping?
> 
> I just accidentally managed to replicate the work done here, though my
> identification of the likely breaking commit was:
> 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d ("usb: dwc2: Enable power down")
> 
> If someone is wondering what I am replying to, should be this patch:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_10535905_&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=1qMcBuV1NPvLIqRPr4X3Wa4Rtcs8mq-oelrWhxibR9I&s=TF8r1TbUqPJgED3XOzvMJ5429MxclO8ei7DEqcOMO7U&e=
> 
> Thanks for reading, and have a nice day.
> 

Could you please elaborate your problem with more details.
This patch "usb: dwc2: Enable power down" enabling power down features. 
Enabling this feature allow to work in hibernation mode but had side 
effect on existing partial power down mode. This is why Hal Emmerich 
<hal@halemmerich.com> by patch "[PATCH] usb: dwc2: disable power_down on 
rockchip devices" disable power down mode for rockchip.
Shortly I'll ack mentioned patch.

Thanks,
Minas

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

* usb: dwc2: disable power_down on rockchip devices
@ 2018-09-12 15:21 Urja Rannikko
  0 siblings, 0 replies; 10+ messages in thread
From: Urja Rannikko @ 2018-09-12 15:21 UTC (permalink / raw)
  To: linux-usb; +Cc: Urja Rannikko

Hi, ping?

I just accidentally managed to replicate the work done here, though my
identification of the likely breaking commit was:
03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d ("usb: dwc2: Enable power down")

If someone is wondering what I am replying to, should be this patch:
https://patchwork.kernel.org/patch/10535905/

Thanks for reading, and have a nice day.

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

* usb: dwc2: disable power_down on rockchip devices
@ 2018-07-20  3:25 Hal Emmerich
  0 siblings, 0 replies; 10+ messages in thread
From: Hal Emmerich @ 2018-07-20  3:25 UTC (permalink / raw)
  To: linux-usb

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>
---
 drivers/usb/dwc2/params.c | 1 +
 1 file changed, 1 insertion(+)

--
2.11.0
--
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

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index f03e41879224..492607adc506 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -82,6 +82,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] 10+ messages in thread

end of thread, other threads:[~2018-10-21 20:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13  6:52 usb: dwc2: disable power_down on rockchip devices Minas Harutyunyan
  -- strict thread matches above, loose matches on Subject: below --
2018-10-21 20:53 Hal Emmerich
2018-10-03  1:58 Hal Emmerich
2018-10-02  7:35 Felipe Balbi
2018-10-01  5:55 Minas Harutyunyan
2018-09-28 14:07 Minas Harutyunyan
2018-09-28  2:58 Hal Emmerich
2018-09-13  6:52 Minas Harutyunyan
2018-09-12 15:21 Urja Rannikko
2018-07-20  3:25 Hal Emmerich

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.