Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1360575 > unrolled thread

[PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable

Started byRoger Quadros <rogerq@ti.com>
First post2016-03-18 13:40 +0100
Last post2016-03-18 14:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable Roger Quadros <rogerq@ti.com> - 2016-03-18 13:40 +0100
    [PATCH 3/5] usb: host: xhci: add broken pe quirk flag to pdata Roger Quadros <rogerq@ti.com> - 2016-03-18 13:40 +0100
    [PATCH 4/5] usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested Roger Quadros <rogerq@ti.com> - 2016-03-18 13:40 +0100
    Re: [PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable Felipe Balbi <balbi@kernel.org> - 2016-03-18 14:10 +0100

#1360575 — [PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable

FromRoger Quadros <rogerq@ti.com>
Date2016-03-18 13:40 +0100
Subject[PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable
Message-ID<re1R7-5Nn-3@gated-at.bofh.it>
Hi,

Some devices from Texas Instruments suffer from
a silicon bug where XHCI Port Enabled/Disabled bit
should not be used to silence an erroneous device.
    
The bug is so that if port is disabled with PED
bit, an IRQ for device removal (or attachment)
will never fire.
    
Just for the sake of completeness, the actual
problem lies with SNPS DWC3 USB IP and this affects
all known versions up to 3.00a

We add a BROKEN_PE quirk in xhci.h to deal with this issue
and add a corresponding bit in xhci platform_data.

I've only updated Felipe's e-mail id in the patches
and re-based them to v4.5 + balbi/next.

--
cheers,
-roger

Felipe Balbi (5):
  usb: xhci: add quirk flag for broken PED bits
  usb: dwc3: core: define macros for newest revisions
  usb: host: xhci: add broken pe quirk flag to pdata
  usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested
  usb: dwc3: host: pass BROKEN_PE flag for known broken revisions

 drivers/usb/dwc3/core.h          |  2 ++
 drivers/usb/dwc3/host.c          | 12 ++++++++++++
 drivers/usb/host/xhci-hub.c      |  6 ++++++
 drivers/usb/host/xhci-plat.c     |  3 +++
 drivers/usb/host/xhci.h          |  2 ++
 include/linux/usb/xhci_pdriver.h |  2 ++
 6 files changed, 27 insertions(+)

-- 
2.5.0

[toc] | [next] | [standalone]


#1360576 — [PATCH 3/5] usb: host: xhci: add broken pe quirk flag to pdata

FromRoger Quadros <rogerq@ti.com>
Date2016-03-18 13:40 +0100
Subject[PATCH 3/5] usb: host: xhci: add broken pe quirk flag to pdata
Message-ID<re1R8-5Nn-21@gated-at.bofh.it>
In reply to#1360575
From: Felipe Balbi <balbi@kernel.org>

Let platform_data users pass broken pe flag to
xhci driver.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 include/linux/usb/xhci_pdriver.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/usb/xhci_pdriver.h b/include/linux/usb/xhci_pdriver.h
index 376654b..81b15ea 100644
--- a/include/linux/usb/xhci_pdriver.h
+++ b/include/linux/usb/xhci_pdriver.h
@@ -18,10 +18,12 @@
  *
  * @usb3_lpm_capable:	determines if this xhci platform supports USB3
  *			LPM capability
+ * @quirk_port_broken_pe: If true, XHCI will not use Port Disable.
  *
  */
 struct usb_xhci_pdata {
 	unsigned	usb3_lpm_capable:1;
+	unsigned	quirk_port_broken_pe:1;
 };
 
 #endif /* __USB_CORE_XHCI_PDRIVER_H */
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1360577 — [PATCH 4/5] usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested

FromRoger Quadros <rogerq@ti.com>
Date2016-03-18 13:40 +0100
Subject[PATCH 4/5] usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested
Message-ID<re1R8-5Nn-17@gated-at.bofh.it>
In reply to#1360575
From: Felipe Balbi <balbi@kernel.org>

In case a broken pe flag is passed in via pdata,
we should enable the corresponding BROKEN_PE quirk
flag for XHCI core.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/host/xhci-plat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index d39d6bf..637d1ae 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -209,6 +209,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
 			(pdata && pdata->usb3_lpm_capable))
 		xhci->quirks |= XHCI_LPM_SUPPORT;
 
+	if (pdata && pdata->quirk_port_broken_pe)
+		xhci->quirks |= XHCI_BROKEN_PORT_PE;
+
 	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
 		xhci->shared_hcd->can_do_streams = 1;
 
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1360605

FromFelipe Balbi <balbi@kernel.org>
Date2016-03-18 14:10 +0100
Message-ID<re2kb-6eM-27@gated-at.bofh.it>
In reply to#1360575

[Multipart message — attachments visible in raw view] — view raw

Mathias,

Roger Quadros <rogerq@ti.com> writes:
> Some devices from Texas Instruments suffer from
> a silicon bug where XHCI Port Enabled/Disabled bit
> should not be used to silence an erroneous device.
>     
> The bug is so that if port is disabled with PED
> bit, an IRQ for device removal (or attachment)
> will never fire.
>     
> Just for the sake of completeness, the actual
> problem lies with SNPS DWC3 USB IP and this affects
> all known versions up to 3.00a
>
> We add a BROKEN_PE quirk in xhci.h to deal with this issue
> and add a corresponding bit in xhci platform_data.
>
> I've only updated Felipe's e-mail id in the patches
> and re-based them to v4.5 + balbi/next.
>
> --
> cheers,
> -roger
>
> Felipe Balbi (5):
>   usb: xhci: add quirk flag for broken PED bits
>   usb: dwc3: core: define macros for newest revisions
>   usb: host: xhci: add broken pe quirk flag to pdata
>   usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested
>   usb: dwc3: host: pass BROKEN_PE flag for known broken revisions

this series has changes on both dwc3 and xhci. Let me know how you wanna
handle these.

-- 
balbi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web