]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drivers/usb: Skip auto handoff for TI and RENESAS usb controllers
authorBabu Moger <babu.moger@oracle.com>
Wed, 30 Mar 2016 20:28:41 +0000 (13:28 -0700)
committerAllen Pais <allen.pais@oracle.com>
Sat, 24 Jun 2017 01:27:48 +0000 (06:57 +0530)
I have never seen auto handoff working on TI and RENESAS xhci
cards. Eventually, we force handoff. This code forces the handoff
unconditionally. It saves 5 seconds boot time for each card.
Added the vendor/device id checks for the card which I have tested.

Orabug: 22345396

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Acked-by: Karl Volz <karl.volz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/usb/host/pci-quirks.c

index f9400564cb721d5e10e2025b23244ef56b789d8b..0915f44b1232c92fb0d1729d6b50bfa002f038bb 100644 (file)
@@ -1003,6 +1003,14 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
                ext_cap_offset = xhci_find_next_cap_offset(base, ext_cap_offset);
        } while (1);
 
+       /* 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);