The following patch fixes the race where a URB is dequeued but it on the
complete list.  It moves up uhci->list_lock so it overlaps the remove_list
lock.

This is the important one, the other 9 are just minor improvements that
reduce code or memory.

diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c       Mon Feb  9 11:42:51 2004
+++ b/drivers/usb/host/uhci-hcd.c       Mon Feb  9 11:42:51 2004
@@ -1943,12 +1943,12 @@
 
        uhci_free_pending_tds(uhci);
 
+       spin_lock(&uhci->urb_list_lock);
        uhci_remove_pending_qhs(uhci);
 
        uhci_clear_next_interrupt(uhci);
 
        /* Walk the list of pending URB's to see which ones completed */
-       spin_lock(&uhci->urb_list_lock);
        head = &uhci->urb_list;
        tmp = head->next;
        while (tmp != head) {


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to