xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes

This change “xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes” (commit 0d4976e) in Linux kernel is authored by Hans de Goede <hdegoede [at] redhat.com> on Wed Aug 20 16:41:55 2014 +0300.

Description of "xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes"

The change “xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes” introduces changes as follows.

xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes

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>

Linux kernel releases containing commit 0d4976e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "xhci: Always ring the doorbell for active eps when a Set TR deq ptr cmd completes"

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/usb/host/xhci-ring.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 074eac69a609..2853b2fb57e2 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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;

The commit for this change in Linux stable tree is 0d4976e (patch).

Last modified: 2020/02/10