]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/xhci-ring.c
xhci: don't use the same variable for stopped and halted rings current TD
[karo-tx-linux.git] / drivers / usb / host / xhci-ring.c
index 5f609325ec7bbed8d560d7016c1d5a731d02612d..e692e769c50c563d540cd4966514512a800d9589 100644 (file)
@@ -716,9 +716,7 @@ remove_finished_td:
                ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
        }
 
-       /* Clear stopped_td if endpoint is not halted */
-       if (!(ep->ep_state & EP_HALTED))
-               ep->stopped_td = NULL;
+       ep->stopped_td = NULL;
 
        /*
         * Drop the lock and complete the URBs in the cancelled TD list.
@@ -1732,13 +1730,11 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
                return;
 
        ep->ep_state |= EP_HALTED;
-       ep->stopped_td = td;
        ep->stopped_stream = stream_id;
 
        xhci_queue_reset_ep(xhci, command, slot_id, ep_index);
-       xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index);
+       xhci_cleanup_stalled_ring(xhci, ep_index, td);
 
-       ep->stopped_td = NULL;
        ep->stopped_stream = 0;
 
        xhci_ring_cmd_db(xhci);