Commit 72c26538 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] patch 2.5.50+, ehci-hcd loop termination

While in search of a different bug, I found this one
that got in with the recent 'async_next' patch.  The
schedule scan termination changed (had to), but it
wasn't quite correct.  Slower and/or misbehaving
devices might have wedged a CPU ... fix is simple,
only restart the scan when the list may have changed.
parent 03360765
...@@ -978,14 +978,19 @@ scan_async (struct ehci_hcd *ehci) ...@@ -978,14 +978,19 @@ scan_async (struct ehci_hcd *ehci)
do { do {
/* clean any finished work for this qh */ /* clean any finished work for this qh */
if (!list_empty (&qh->qtd_list)) { if (!list_empty (&qh->qtd_list)) {
// dbg_qh ("scan_async", ehci, qh); int temp;
qh = qh_get (qh);
/* concurrent unlink could happen here */ /* unlinks could happen here; completion
count += qh_completions (ehci, qh); * reporting drops the lock.
*/
qh = qh_get (qh);
temp = qh_completions (ehci, qh);
qh_put (ehci, qh); qh_put (ehci, qh);
if (temp != 0) {
count += temp;
goto rescan; goto rescan;
} }
}
/* unlink idle entries, reducing HC PCI usage as /* unlink idle entries, reducing HC PCI usage as
* well as HCD schedule-scanning costs. * well as HCD schedule-scanning costs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment