public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] usb/ehci-hub: Add workaround for EG20T/ML7213/ML7223/ML7831
@ 2012-04-10  4:07 Tomoya MORINAGA
  2012-04-10  4:07 ` [PATCH 2/2] usb/ehci-pci: " Tomoya MORINAGA
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tomoya MORINAGA @ 2012-04-10  4:07 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman, linux-usb, linux-kernel
  Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, Tomoya MORINAGA

ISSUE: When a bit of EHCI status register (USBSTS) is set
as 1, if the corresponded bit of EHCI interrupt enable
register(USBINTR) is set as 1, an interrupt occurs.
After that, even if the bit of USBINTR is set as 0, the
interrupt continues occurring.
Workaround: Clear the bit 3 of USBSTS before enabling the
interrupt, at resume process.

This patch is for
Intel EG20T PCH
LAPIS Semiconductor ML7213 IOH
LAPIS Semiconductor ML7223 IOH
LAPIS Semiconductor ML7831 IOH

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
---
 drivers/usb/host/ehci-hub.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 256fbd4..7ddb62e 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -342,6 +342,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
 	u32			power_okay;
 	int			i;
 	unsigned long		resume_needed = 0;
+	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
 
 	if (time_before (jiffies, ehci->next_statechange))
 		msleep(5);
@@ -451,6 +452,23 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
 
 	ehci->next_statechange = jiffies + msecs_to_jiffies(5);
 
+	if ((pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x8807) ||
+	   (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x880F) ||
+	   (pdev->vendor == 0x10DB && pdev->device == 0x801C) || /* ML7213 */
+	   (pdev->vendor == 0x10DB && pdev->device == 0x8007) || /* ML7223 */
+	   (pdev->vendor == 0x10DB && pdev->device == 0x8807)) { /* ML7831 */
+		/* ISSUE: When a bit of EHCI status register (USBSTS) is set
+		 * as 1, if the corresponded bit of EHCI interrupt enable
+		 * register(USBINTR) is set as 1, an interrupt occurs.
+		 * After that, even if the bit of USBINTR is set as 0, the
+		 * interrupt continues occurring.
+		 * Workaround: Clear the bit 3 of USBSTS before enabling the
+		 * interrupt, at resume process.
+		 */
+		ehci_writel(ehci, STS_FLR, &ehci->regs->status);
+		ehci_dbg(ehci, "Workaround: %s: Clear STS_FLR\n", __func__);
+	}
+
 	/* Now we can safely re-enable irqs */
 	ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
 
-- 
1.7.7.6


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

end of thread, other threads:[~2012-04-18 10:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10  4:07 [PATCH 1/2] usb/ehci-hub: Add workaround for EG20T/ML7213/ML7223/ML7831 Tomoya MORINAGA
2012-04-10  4:07 ` [PATCH 2/2] usb/ehci-pci: " Tomoya MORINAGA
2012-04-10 12:37 ` [PATCH 1/2] usb/ehci-hub: " Sergei Shtylyov
2012-04-10 14:57 ` Alan Stern
2012-04-18 10:22   ` Tomoya MORINAGA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox