drivers/usb: Skip auto handoff for TI and RENESAS usb controllers
authorBabu Moger <babu.moger@oracle.com>
Fri, 21 Oct 2016 22:25:05 +0000 (15:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2016 09:12:22 +0000 (10:12 +0100)
Never seen XHCI auto handoff working on TI and RENESAS cards.
Eventually, we force handoff. This code forces the handoff
unconditionally. It saves 5 seconds boot time for each card.

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/pci-quirks.c

index d793f548dfe26aef387d13b703454abe67beb5be..a9a1e4c40480cf2c5c7c7995aa5d337d3ef3ee87 100644 (file)
@@ -995,6 +995,14 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
        }
        val = readl(base + ext_cap_offset);
 
+       /* Auto handoff never worked for these devices. Force it and continue */
+       if ((pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) ||
+                       (pdev->vendor == PCI_VENDOR_ID_RENESAS
+                        && pdev->device == 0x0014)) {
+               val = (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED;
+               writel(val, base + ext_cap_offset);
+       }
+
        /* If the BIOS owns the HC, signal that the OS wants it, and wait */
        if (val & XHCI_HC_BIOS_OWNED) {
                writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);