Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967199AbcCPW0O (ORCPT ); Wed, 16 Mar 2016 18:26:14 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19787 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966914AbcCPW0I (ORCPT ); Wed, 16 Mar 2016 18:26:08 -0400 Subject: Re: [PATCH v2] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers To: mathias.nyman@intel.com References: <1452187407-34440-1-git-send-email-babu.moger@oracle.com> <1452267592-53926-1-git-send-email-babu.moger@oracle.com> Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Babu Moger Organization: Oracle Corporation Message-ID: <56E9DD79.7010001@oracle.com> Date: Wed, 16 Mar 2016 17:26:01 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1452267592-53926-1-git-send-email-babu.moger@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1454 Lines: 37 Its been a while since I submit this patch. Ping 1. On 1/8/2016 9:39 AM, Babu Moger wrote: > 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. > > Signed-off-by: Babu Moger > --- > v2: > Made changes per comments from Greg KH. > Extra space removal in assignment > Added both vendor and device id checks. > > 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); >