]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/usb/host/xhci-ring.c
USB: xhci: Fix issue with set interface after stall.
[net-next-2.6.git] / drivers / usb / host / xhci-ring.c
index 85d7e8f2085e70481cb0cdcf4207f15efa1ba886..b520b37c0f36ed391e115259b37b06bc96f5cda6 100644 (file)
@@ -578,6 +578,8 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
                /* Otherwise just ring the doorbell to restart the ring */
                ring_ep_doorbell(xhci, slot_id, ep_index);
        }
+       ep->stopped_td = NULL;
+       ep->stopped_trb = NULL;
 
        /*
         * Drop the lock and complete the URBs in the cancelled TD list.
@@ -1061,8 +1063,13 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
        ep->ep_state |= EP_HALTED;
        ep->stopped_td = td;
        ep->stopped_trb = event_trb;
+
        xhci_queue_reset_ep(xhci, slot_id, ep_index);
        xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index);
+
+       ep->stopped_td = NULL;
+       ep->stopped_trb = NULL;
+
        xhci_ring_cmd_db(xhci);
 }