diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 256df57c9570..bebec6f33fe7 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -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); } diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 36865d50171f..56ee2884df25 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -17,6 +17,7 @@ #include #include #include +#include #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; } diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 6a3fa191553c..f9ea951e8919 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -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;