PrawnOS-nonfree/patches-tested/rockchip-dwc2-usb-partial-power-down.patch
SolidHal cad1891021 Address mmc issue
Added three patches to fix the mmc issue as described here:
https://github.com/SolidHal/Librean/issues/17
Source for the patches is the chrome os kernel. Links to
the commits can be found in the issue.

Locking into version 4.17.2 for the time being.

Better organized patches.
Added logic to only apply tested patches on fresh kernel.

Moved some debian build improvements in from my devsus
master branch, including switching from xfce to lxqt.

May be able to add option between the two in the future,
as the issue that led to switching DEs may have been with
the xorg video drivers that are now skipped by the script
and not xfce itself.

Cleaned up uneeded old configs
2018-08-23 14:43:20 -05:00

43 lines
1.6 KiB
Diff

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