All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Atmel USB High speed device port, speed fix
@ 2015-11-15  0:02 ` Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2015-11-15  0:02 UTC (permalink / raw)
  To: linux-arm-kernel

Following changes that appeared in lk 4.0.0, the gadget udc driver for
some ARM based Atmel SoCs (e.g. at91sam9x5 and sama5d3 families)
incorrectly deduced full-speed USB link speed even when the hardware
had negotiated a high-speed link. The fix is to make sure that the
UDPHS Interrupt Enable Register value does not mask the SPEED bit
in the Interrupt Status Register.

For a mass storage gadget this problem lead to failures when the host
had a USB 3 port with the xhci_hcd driver. If the host was a USB 2
port using the ehci_hcd driver then the mass storage gadget worked
(but probably at a lower speed than it should have).


Signed-of-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: <stable@vger.kernel.org> #4.0+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atmel_udhs_int_mask.patch
Type: text/x-patch
Size: 553 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151114/264e3f38/attachment.bin>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Atmel USB High speed device port, speed fix
@ 2015-11-15  0:02 ` Douglas Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2015-11-15  0:02 UTC (permalink / raw)
  To: linux-arm-kernel, USB list, Boris BREZILLON, Ferre, Nicolas,
	Felipe Balbi
  Cc: Alan Stern, stable

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

Following changes that appeared in lk 4.0.0, the gadget udc driver for
some ARM based Atmel SoCs (e.g. at91sam9x5 and sama5d3 families)
incorrectly deduced full-speed USB link speed even when the hardware
had negotiated a high-speed link. The fix is to make sure that the
UDPHS Interrupt Enable Register value does not mask the SPEED bit
in the Interrupt Status Register.

For a mass storage gadget this problem lead to failures when the host
had a USB 3 port with the xhci_hcd driver. If the host was a USB 2
port using the ehci_hcd driver then the mass storage gadget worked
(but probably at a lower speed than it should have).


Signed-of-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: <stable@vger.kernel.org> #4.0+

[-- Attachment #2: atmel_udhs_int_mask.patch --]
[-- Type: text/x-patch, Size: 553 bytes --]

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index f0f2b06..f92f5af 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1633,7 +1633,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
 	spin_lock(&udc->lock);
 
 	int_enb = usba_int_enb_get(udc);
-	status = usba_readl(udc, INT_STA) & int_enb;
+	status = usba_readl(udc, INT_STA) & (int_enb | USBA_HIGH_SPEED);
 	DBG(DBG_INT, "irq, status=%#08x\n", status);
 
 	if (status & USBA_DET_SUSPEND) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-15  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-15  0:02 [PATCH] Atmel USB High speed device port, speed fix Douglas Gilbert
2015-11-15  0:02 ` Douglas Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.