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 301913 Details for
Bug 435787
RHEL4.7: 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]
Fix-up patch
linux-2.6.9-68.32.EL-ehci2.diff (text/plain), 6.03 KB, created by
Pete Zaitcev
on 2008-04-10 00:18:00 UTC
(
hide
)
Description:
Fix-up patch
Filename:
MIME Type:
Creator:
Pete Zaitcev
Created:
2008-04-10 00:18:00 UTC
Size:
6.03 KB
patch
obsolete
>diff -urp -X dontdiff linux-2.6.9-68.32.EL/drivers/usb/host/ehci-hcd.c linux-2.6.9-68.32.EL-441552/drivers/usb/host/ehci-hcd.c >--- linux-2.6.9-68.32.EL/drivers/usb/host/ehci-hcd.c 2008-04-07 17:31:56.000000000 -0700 >+++ linux-2.6.9-68.32.EL-441552/drivers/usb/host/ehci-hcd.c 2008-04-09 15:48:24.000000000 -0700 >@@ -946,6 +946,32 @@ static int ehci_urb_enqueue ( > } > } > >+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) >+{ >+ /* failfast */ >+ if (!HCD_IS_RUNNING(ehci->hcd.state) && ehci->reclaim) >+ end_unlink_async(ehci, NULL); >+ >+ /* if it's not linked then there's nothing to do */ >+ if (qh->qh_state != QH_STATE_LINKED) >+ ; >+ >+ /* defer till later if busy */ >+ else if (ehci->reclaim) { >+ struct ehci_qh *last; >+ >+ for (last = ehci->reclaim; >+ last->reclaim; >+ last = last->reclaim) >+ continue; >+ qh->qh_state = QH_STATE_UNLINK_WAIT; >+ last->reclaim = qh; >+ >+ /* start IAA cycle */ >+ } else >+ start_unlink_async (ehci, qh); >+} >+ > /* remove from hardware lists > * completions normally happen asynchronously > */ >@@ -964,11 +990,10 @@ static int ehci_urb_dequeue (struct usb_ > qh = (struct ehci_qh *) urb->hcpriv; > if (!qh) > break; >- > switch (qh->qh_state) { > case QH_STATE_LINKED: > case QH_STATE_COMPLETING: >- //unlink_async(ehci, qh); >+ unlink_async(ehci, qh); > break; > case QH_STATE_UNLINK: > case QH_STATE_UNLINK_WAIT: >@@ -1030,7 +1055,7 @@ ehci_endpoint_disable (struct usb_hcd *h > struct ehci_hcd *ehci = hcd_to_ehci (hcd); > int epnum; > unsigned long flags; >- struct ehci_qh *qh; >+ struct ehci_qh *qh, *tmp; > > /* ASSERT: any requests/urbs are being unlinked */ > /* ASSERT: nobody can be submitting urbs for this any more */ >@@ -1056,6 +1081,16 @@ rescan: > if (!HCD_IS_RUNNING (ehci->hcd.state)) > qh->qh_state = QH_STATE_IDLE; > switch (qh->qh_state) { >+ case QH_STATE_LINKED: >+ for (tmp = ehci->async->qh_next.qh; >+ tmp && tmp != qh; >+ tmp = tmp->qh_next.qh) >+ continue; >+ /* periodic qh self-unlinks on empty */ >+ if (!tmp) >+ goto nogood; >+ unlink_async (ehci, qh); >+ /* FALL THROUGH */ > case QH_STATE_UNLINK: /* wait for hw to finish? */ > case QH_STATE_UNLINK_WAIT: > idle_timeout: >@@ -1070,6 +1105,7 @@ idle_timeout: > } > /* else FALL THROUGH */ > default: >+nogood: > /* caller was supposed to have unlinked any requests; > * that's not our job. just leak this memory. > */ >diff -urp -X dontdiff linux-2.6.9-68.32.EL/drivers/usb/host/ehci-q.c linux-2.6.9-68.32.EL-441552/drivers/usb/host/ehci-q.c >--- linux-2.6.9-68.32.EL/drivers/usb/host/ehci-q.c 2008-04-07 17:31:56.000000000 -0700 >+++ linux-2.6.9-68.32.EL-441552/drivers/usb/host/ehci-q.c 2008-04-09 15:19:58.000000000 -0700 >@@ -96,6 +96,29 @@ qh_update (struct ehci_hcd *ehci, struct > qh->hw_token &= __constant_cpu_to_le32 (QTD_TOGGLE | QTD_STS_PING); > } > >+/* if it weren't for a common silicon quirk (writing the dummy into the qh >+ * overlay, so qh->hw_token wrongly becomes inactive/halted), only fault >+ * recovery (including urb dequeue) would need software changes to a QH... >+ */ >+static void >+qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh) >+{ >+ struct ehci_qtd *qtd; >+ >+ if (list_empty (&qh->qtd_list)) >+ qtd = qh->dummy; >+ else { >+ qtd = list_entry (qh->qtd_list.next, >+ struct ehci_qtd, qtd_list); >+ /* first qtd may already be partially processed */ >+ if (cpu_to_le32 (qtd->qtd_dma) == qh->hw_current) >+ qtd = NULL; >+ } >+ >+ if (qtd) >+ qh_update (ehci, qh, qtd); >+} >+ > /*-------------------------------------------------------------------------*/ > > static void qtd_copy_status ( >@@ -224,6 +247,11 @@ ehci_urb_done (struct ehci_hcd *ehci, st > spin_lock (&ehci->lock); > } > >+static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh); >+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh); >+ >+static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh, int wait); >+static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh); > > /* > * Process and free completed qtds for a qh, returning URBs to drivers. >@@ -368,17 +396,22 @@ halt: > if (unlikely (stopped != 0) > /* some EHCI 0.95 impls will overlay dummy qtds */ > || qh->hw_qtd_next == EHCI_LIST_END) { >- if (list_empty (&qh->qtd_list)) >- end = qh->dummy; >- else { >- end = list_entry (qh->qtd_list.next, >- struct ehci_qtd, qtd_list); >- /* first qtd may already be partially processed */ >- if (cpu_to_le32 (end->qtd_dma) == qh->hw_current) >- end = NULL; >+ switch (state) { >+ case QH_STATE_IDLE: >+ qh_refresh(ehci, qh); >+ break; >+ case QH_STATE_LINKED: >+ /* should be rare for periodic transfers, >+ * except maybe high bandwidth ... >+ */ >+ if ((cpu_to_le32(0x00ff) & qh->hw_info2) != 0) { >+ intr_deschedule (ehci, qh, 1); >+ (void) qh_schedule (ehci, qh); >+ } else >+ unlink_async (ehci, qh); >+ break; >+ /* otherwise, unlink already started */ > } >- if (end) >- qh_update (ehci, qh, end); > } > > return count; >@@ -931,8 +964,6 @@ submit_async ( > > /* the async qh for the qtds being reclaimed are now unlinked from the HC */ > >-static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh); >- > static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs) > { > struct ehci_qh *qh = ehci->reclaim; >@@ -987,10 +1018,6 @@ static void start_unlink_async (struct e > if (ehci->reclaim > || (qh->qh_state != QH_STATE_LINKED > && qh->qh_state != QH_STATE_UNLINK_WAIT) >-#ifdef CONFIG_SMP >-// this macro lies except on SMP compiles >- || !spin_is_locked (&ehci->lock) >-#endif > ) > BUG (); > #endif >@@ -998,14 +1025,15 @@ static void start_unlink_async (struct e > /* stop async schedule right now? */ > if (unlikely (qh == ehci->async)) { > /* can't get here without STS_ASS set */ >- if (ehci->hcd.state != USB_STATE_HALT) { >+ if (ehci->hcd.state != USB_STATE_HALT >+ && !ehci->reclaim) { > writel (cmd & ~CMD_ASE, &ehci->regs->command); > wmb (); > // handshake later, if we need to >+ timer_action_done (ehci, TIMER_ASYNC_OFF); > } >- timer_action_done (ehci, TIMER_ASYNC_OFF); > return; >- } >+ } > > qh->qh_state = QH_STATE_UNLINK; > ehci->reclaim = qh = qh_get (qh);
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 435787
:
297411
|
297591
|
301746
|
301913
|
303125
|
304091