mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
usb: host: xhci: add a quirk for disable autosuspend
Some USB controllers (such as rk3328 SoC DWC3 controller with INNO USB 3.0 PHY) don't support autosuspend well, when receive remote wakeup signal from autosuspend, the Port Link State training failed, the correct PLC is Resume->Recovery->U0, but when the issue happens, the wrong PLC is Resume->Recovery->Inactive, cause resuming SS port fail. This issue always occurs when connect with external USB 3.0 HUB. This patch adds a quirk to disable xHC USB 3.0 root HUB autosuspend function. Change-Id: I6afade864235a7669f415d933b7b4983c0d46289 Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
@@ -294,6 +294,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
||||
if (device_property_read_bool(tmpdev, "xhci-trb-ent-quirk"))
|
||||
xhci->quirks |= XHCI_TRB_ENT_QUIRK;
|
||||
|
||||
if (device_property_read_bool(tmpdev, "usb3-dis-autosuspend"))
|
||||
xhci->quirks |= XHCI_DIS_AUTOSUSPEND;
|
||||
|
||||
device_property_read_u32(tmpdev, "imod-interval-ns",
|
||||
&xhci->imod_interval);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/usb/quirks.h>
|
||||
|
||||
#include "xhci.h"
|
||||
#include "xhci-trace.h"
|
||||
@@ -5100,6 +5101,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
/* xHCI private pointer was set in xhci_pci_probe for the second
|
||||
* registered roothub.
|
||||
*/
|
||||
if (xhci->quirks & XHCI_DIS_AUTOSUSPEND)
|
||||
xhci->shared_hcd->self.root_hub->quirks |=
|
||||
USB_QUIRK_AUTO_SUSPEND;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1870,6 +1870,7 @@ struct xhci_hcd {
|
||||
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
||||
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
||||
#define XHCI_TRB_ENT_QUIRK BIT_ULL(36)
|
||||
#define XHCI_DIS_AUTOSUSPEND BIT_ULL(37)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
|
||||
Reference in New Issue
Block a user