Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 297010 Details for
Bug 435670
RHEL5.2: USB stress test failure on AMD SBX00
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Another USB patch to make things better
SBX00_USB_hang_fix_RHEL5.1_new.patch (text/plain), 3.43 KB, created by
Shane Huang
on 2008-03-06 08:42:51 UTC
(
hide
)
Description:
Another USB patch to make things better
Filename:
MIME Type:
Creator:
Shane Huang
Created:
2008-03-06 08:42:51 UTC
Size:
3.43 KB
patch
obsolete
>diff -ruN c/drivers/usb/host/ehci-hcd.c d/drivers/usb/host/ehci-hcd.c >--- c/drivers/usb/host/ehci-hcd.c 2008-03-06 16:14:46.000000000 +0800 >+++ d/drivers/usb/host/ehci-hcd.c 2008-03-06 16:17:55.000000000 +0800 >@@ -268,23 +268,44 @@ > { > struct ehci_hcd *ehci = (struct ehci_hcd *) param; > unsigned long flags; >- u32 status, cmd; > > spin_lock_irqsave (&ehci->lock, flags); >- WARN_ON(!ehci->reclaim); >- >- status = readl(&ehci->regs->status); >- cmd = readl(&ehci->regs->command); >- ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd); > >- /* lost IAA irqs wedge things badly; seen first with a vt8235 */ >- if (ehci->reclaim) { >- if (status & STS_IAA) { >- ehci_vdbg (ehci, "lost IAA\n"); >+ /* Lost IAA irqs wedge things badly; seen first with a vt8235. >+ * So we need this watchdog, but must protect it against both >+ * (a) SMP races against real IAA firing and retriggering, and >+ * (b) clean HC shutdown, when IAA watchdog was pending. >+ */ >+ if (ehci->reclaim >+ && !timer_pending(&ehci->iaa_watchdog) >+ && HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) { >+ u32 cmd, status; >+ >+ /* If we get here, IAA is *REALLY* late. It's barely >+ * conceivable that the system is so busy that CMD_IAAD >+ * is still legitimately set, so let's be sure it's >+ * clear before we read STS_IAA. (The HC should clear >+ * CMD_IAAD when it sets STS_IAA.) >+ */ >+ cmd = readl(&ehci->regs->command); >+ if (cmd & CMD_IAAD) >+ writel(cmd & ~CMD_IAAD, >+ &ehci->regs->command); >+ >+ /* If IAA is set here it either legitimately triggered >+ * before we cleared IAAD above (but _way_ late, so we'll >+ * still count it as lost) ... or a silicon erratum: >+ * - VIA seems to set IAA without triggering the IRQ; >+ * - IAAD potentially cleared without setting IAA. >+ */ >+ status = readl(&ehci->regs->status); >+ if ((status & STS_IAA) || !(cmd & CMD_IAAD)) { > COUNT (ehci->stats.lost_iaa); > writel (STS_IAA, &ehci->regs->status); > } >- writel(cmd & ~CMD_IAAD, &ehci->regs->command); >+ >+ ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n", >+ status, cmd); > end_unlink_async(ehci, NULL); > } > >@@ -586,7 +607,7 @@ > static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) > { > struct ehci_hcd *ehci = hcd_to_ehci (hcd); >- u32 status; >+ u32 status, cmd; > int bh; > > spin_lock (&ehci->lock); >@@ -607,7 +628,7 @@ > > /* clear (just) interrupts */ > writel (status, &ehci->regs->status); >- readl (&ehci->regs->command); /* unblock posted write */ >+ cmd = readl(&ehci->regs->command); > bh = 0; > > #ifdef EHCI_VERBOSE_DEBUG >@@ -628,8 +649,17 @@ > > /* complete the unlinking of some qh [4.15.2.3] */ > if (status & STS_IAA) { >- COUNT (ehci->stats.reclaim); >- end_unlink_async(ehci, NULL); >+ /* guard against (alleged) silicon errata */ >+ if (cmd & CMD_IAAD) { >+ writel(cmd & ~CMD_IAAD, >+ &ehci->regs->command); >+ ehci_dbg(ehci, "IAA with IAAD still set?\n"); >+ } >+ if (ehci->reclaim) { >+ COUNT(ehci->stats.reclaim); >+ end_unlink_async(ehci, NULL); >+ } else >+ ehci_dbg(ehci, "IAA with nothing to reclaim?\n"); > } > > /* remote wakeup [4.3.1] */ >diff -ruN c/drivers/usb/host/ehci-q.c d/drivers/usb/host/ehci-q.c >--- c/drivers/usb/host/ehci-q.c 2008-03-06 16:14:40.000000000 +0800 >+++ d/drivers/usb/host/ehci-q.c 2008-03-06 16:17:48.000000000 +0800 >@@ -969,11 +969,6 @@ > > iaa_watchdog_done(ehci); > >- if (!qh) { >- WARN_ON(1); >- return; >- } >- > // qh->hw_next = cpu_to_le32 (qh->qh_dma); > qh->qh_state = QH_STATE_IDLE; > qh->qh_next.qh = NULL;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435670
:
296565
|
296703
| 297010