From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930AbcAHAFM (ORCPT ); Thu, 7 Jan 2016 19:05:12 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:47842 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753482AbcAHAFJ (ORCPT ); Thu, 7 Jan 2016 19:05:09 -0500 From: Babu Moger To: mathias.nyman@intel.com Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, babu.moger@oracle.com Subject: [PATCH v2] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers Date: Thu, 7 Jan 2016 16:04:51 -0800 Message-Id: <1452211491-206137-1-git-send-email-babu.moger@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1452187407-34440-1-git-send-email-babu.moger@oracle.com> References: <1452187407-34440-1-git-send-email-babu.moger@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I have never seen 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. Changes v0 -> v1 Made changes per comments from Greg KH. Extra space removal in assignment Added both vendor and device id checks. Signed-off-by: Babu Moger --- drivers/usb/host/pci-quirks.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index f940056..0915f44 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); -- 1.7.1