Question about change to ehci-hcd
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Dave:
While going through ehci-hcd, I came up with this:
Index: usb-2.6/drivers/usb/host/ehci-q.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-q.c
+++ usb-2.6/drivers/usb/host/ehci-q.c
@@ -282,7 +282,7 @@ static int qh_schedule (struct ehci_hcd
static unsigned
qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
{
- struct ehci_qtd *last = NULL, *end = qh->dummy;
+ struct ehci_qtd *last = NULL;
struct list_head *entry, *tmp;
int stopped;
unsigned count = 0;
@@ -330,8 +330,8 @@ qh_completions (struct ehci_hcd *ehci, s
last = NULL;
}
- /* ignore urbs submitted during completions we reported */
- if (qtd == end)
+ /* stop when we reach the dummy at the end */
+ if (qtd == qh->dummy)
break;
/* hardware copies qtd out of qh overlay */
It looks like the original code has a mistaken optimization there. If
during a callback some driver submitted an URB and then unlinked it,
the unlink would effectively get lost.
Alan Stern
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel