rockchip-dwc2-usb-partial-power-down.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001
  2. From: Hal Emmerich <hal@halemmerich.com>
  3. Date: Thu, 19 Jul 2018 21:48:08 -0500
  4. Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices
  5. The bug would let the usb controller enter partial power down,
  6. which was formally known as hibernate, upon boot if nothing was plugged
  7. in to the port. Partial power down couldn't be exited properly, so any
  8. usb devices plugged in after boot would not be usable.
  9. Before the name change, params.hibernation was false by default, so
  10. _dwc2_hcd_suspend() would skip entering hibernation. With the
  11. rename, _dwc2_hcd_suspend() was changed to use params.power_down
  12. to decide whether or not to enter partial power down.
  13. Since params.power_down is non-zero by default, it needs to be set
  14. to 0 for rockchip devices to restore functionality.
  15. This bug was reported in the linux-usb thread:
  16. REGRESSION: usb: dwc2: USB device not seen after boot
  17. The commit that caused this regression is:
  18. 6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6
  19. Signed-off-by: Hal Emmerich <hal@halemmerich.com>
  20. ---
  21. drivers/usb/dwc2/params.c | 1 +
  22. 1 file changed, 1 insertion(+)
  23. diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
  24. index f03e41879224..492607adc506 100644
  25. --- a/drivers/usb/dwc2/params.c
  26. +++ b/drivers/usb/dwc2/params.c
  27. @@ -82,6 +82,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)
  28. p->host_perio_tx_fifo_size = 256;
  29. p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<
  30. GAHBCFG_HBSTLEN_SHIFT;
  31. + p->power_down = 0;
  32. }
  33. static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)
  34. --
  35. 2.11.0