xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
[pandora-kernel.git] / drivers / usb / host / ohci-q.c
index 15dc51d..e0ae777 100644 (file)
@@ -1130,6 +1130,25 @@ dl_done_list (struct ohci_hcd *ohci)
 
        while (td) {
                struct td       *td_next = td->next_dl_td;
+               struct ed       *ed = td->ed;
+
+               /*
+                * Some OHCI controllers (NVIDIA for sure, maybe others)
+                * occasionally forget to add TDs to the done queue.  Since
+                * TDs for a given endpoint are always processed in order,
+                * if we find a TD on the donelist then all of its
+                * predecessors must be finished as well.
+                */
+               for (;;) {
+                       struct td       *td2;
+
+                       td2 = list_first_entry(&ed->td_list, struct td,
+                                       td_list);
+                       if (td2 == td)
+                               break;
+                       takeback_td(ohci, td2);
+               }
+
                takeback_td(ohci, td);
                td = td_next;
        }