xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes
authorHans de Goede <hdegoede@redhat.com>
Wed, 20 Aug 2014 13:41:55 +0000 (16:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 04:46:11 +0000 (21:46 -0700)
Even if the stream for which the command was intended has been freed in the
mean time. This ensures that things start rolling again after an unlink / halt.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c

index 074eac69a60958cdf6d56fef111479a1dbf9c540..2853b2fb57e2b03f3047476c555feeae0a3247ee 100644 (file)
@@ -965,8 +965,7 @@ static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id,
                xhci_warn(xhci, "WARN Set TR deq ptr command for freed stream ID %u\n",
                                stream_id);
                /* XXX: Harmless??? */
-               dev->eps[ep_index].ep_state &= ~SET_DEQ_PENDING;
-               return;
+               goto cleanup;
        }
 
        ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index);
@@ -1031,6 +1030,7 @@ static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id,
                }
        }
 
+cleanup:
        dev->eps[ep_index].ep_state &= ~SET_DEQ_PENDING;
        dev->eps[ep_index].queued_deq_seg = NULL;
        dev->eps[ep_index].queued_deq_ptr = NULL;