From: Babu Moger Date: Wed, 30 Mar 2016 20:28:41 +0000 (-0700) Subject: drivers/usb: Skip auto handoff for TI and RENESAS usb controllers X-Git-Tag: v4.1.12-105.0.20170705_2000~46 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=352b0130033cacb03bd5fd6c3dd9abb8cbe5f28a;p=users%2Fjedix%2Flinux-maple.git drivers/usb: Skip auto handoff for TI and RENESAS usb controllers 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 Acked-by: Karl Volz Signed-off-by: Allen Pais --- diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index f9400564cb72..0915f44b1232 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -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);