Re: [PATCH] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers

2016-01-07 Thread Greg KH
On Thu, Jan 07, 2016 at 09:23:27AM -0800, 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 
> ---
>  drivers/usb/host/pci-quirks.c |7 +++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
> index f940056..b7ee895 100644
> --- a/drivers/usb/host/pci-quirks.c
> +++ b/drivers/usb/host/pci-quirks.c
> @@ -1003,6 +1003,13 @@ 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->vendor == PCI_VENDOR_ID_RENESAS) {
> + val  =  (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED;

odd spaces here, why this format?

And are you sure that all TI and Renesas host controllers have this
issue?  That's a very wide and broad test you are making here...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers

2016-01-07 Thread Babu Moger
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 
---
 drivers/usb/host/pci-quirks.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index f940056..b7ee895 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1003,6 +1003,13 @@ 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->vendor == PCI_VENDOR_ID_RENESAS) {
+   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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers

2016-01-07 Thread Babu Moger
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 
---
 drivers/usb/host/pci-quirks.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index f940056..b7ee895 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1003,6 +1003,13 @@ 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->vendor == PCI_VENDOR_ID_RENESAS) {
+   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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers/usb: Skip auto handoff for TI and RENESAS usb controllers

2016-01-07 Thread Greg KH
On Thu, Jan 07, 2016 at 09:23:27AM -0800, 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 
> ---
>  drivers/usb/host/pci-quirks.c |7 +++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
> index f940056..b7ee895 100644
> --- a/drivers/usb/host/pci-quirks.c
> +++ b/drivers/usb/host/pci-quirks.c
> @@ -1003,6 +1003,13 @@ 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->vendor == PCI_VENDOR_ID_RENESAS) {
> + val  =  (val | XHCI_HC_OS_OWNED) & ~XHCI_HC_BIOS_OWNED;

odd spaces here, why this format?

And are you sure that all TI and Renesas host controllers have this
issue?  That's a very wide and broad test you are making here...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/