diff options
Diffstat (limited to 'drivers/usb/host/xhci-hcd.c')
-rw-r--r-- | drivers/usb/host/xhci-hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 932f9993848..3a30db6d6ab 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c | |||
@@ -817,12 +817,12 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
817 | xhci_debug_ring(xhci, ep_ring); | 817 | xhci_debug_ring(xhci, ep_ring); |
818 | td = (struct xhci_td *) urb->hcpriv; | 818 | td = (struct xhci_td *) urb->hcpriv; |
819 | 819 | ||
820 | ep->cancels_pending++; | ||
821 | list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list); | 820 | list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list); |
822 | /* Queue a stop endpoint command, but only if this is | 821 | /* Queue a stop endpoint command, but only if this is |
823 | * the first cancellation to be handled. | 822 | * the first cancellation to be handled. |
824 | */ | 823 | */ |
825 | if (ep->cancels_pending == 1) { | 824 | if (!(ep->ep_state & EP_HALT_PENDING)) { |
825 | ep->ep_state |= EP_HALT_PENDING; | ||
826 | xhci_queue_stop_endpoint(xhci, urb->dev->slot_id, ep_index); | 826 | xhci_queue_stop_endpoint(xhci, urb->dev->slot_id, ep_index); |
827 | xhci_ring_cmd_db(xhci); | 827 | xhci_ring_cmd_db(xhci); |
828 | } | 828 | } |