[Acked/cmt] [Vivid][SRU][PATCH] xhci: call BIOS workaround to enable runtime suspend on Intel Braswell

Andy Whitcroft apw at canonical.com
Tue Sep 1 15:34:46 UTC 2015


On Tue, Sep 01, 2015 at 06:01:32PM +0800, Phidias Chiang wrote:
> From: Mathias Nyman <mathias.nyman at linux.intel.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1489292
> 
> Intel xhci hw that require XHCI_PME_STUCK quirk have as default disabled
> xhci from going to D3 state in runtime suspend. Driver needs to verify
> it can deal with the hw by calling an ACPI _DSM method to get D3 enabled.
> 
> Signed-off-by: Mathias Nyman <mathias.nyman at linux.intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> (cherry picked from commit c3c5819a350952439c3198aa46581f9e4c46557f)
> Signed-off-by: Phidias Chiang <phidias.chiang at canonical.com>
> Reviewed-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
> ---
>  drivers/usb/host/xhci-pci.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 2af32e2..5a00b6a 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -23,6 +23,7 @@
>  #include <linux/pci.h>
>  #include <linux/slab.h>
>  #include <linux/module.h>
> +#include <linux/acpi.h>
>  
>  #include "xhci.h"
>  #include "xhci-trace.h"
> @@ -183,6 +184,19 @@ static void xhci_pme_quirk(struct xhci_hcd *xhci)
>  	readl(reg);
>  }
>  
> +#ifdef CONFIG_ACPI
> +static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
> +{
> +	static const u8 intel_dsm_uuid[] = {
> +		0xb7, 0x0c, 0x34, 0xac,	0x01, 0xe9, 0xbf, 0x45,
> +		0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
> +	};
> +	acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1, NULL);
> +}
> +#else
> +	static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
> +#endif /* CONFIG_ACPI */
> +
>  /* called during probe() after chip reset completes */
>  static int xhci_pci_setup(struct usb_hcd *hcd)
>  {
> @@ -262,6 +276,9 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  			HCC_MAX_PSA(xhci->hcc_params) >= 4)
>  		xhci->shared_hcd->can_do_streams = 1;
>  
> +	if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
> +		xhci_pme_acpi_rtd3_enable(dev);
> +
>  	/* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
>  	pm_runtime_put_noidle(&dev->dev);
>  
> -- 
> 2.1.4
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Assuming that the affected platform have the following h/w, then this
looks applicable:

+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+               (pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
+                pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI ||
+                pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI)) {
+               xhci->quirks |= XHCI_PME_STUCK_QUIRK;
+       }

Otherwise it looks to be an applicable cherry-pick, so:

Acked-by: Andy Whitcroft <apw at canonical.com>

-apw




More information about the kernel-team mailing list