* Patch "usb: core: unlink urbs from the tail of the endpoint's urb_list" has been added to the 4.9-stable tree
@ 2017-08-13 22:19 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-13 22:19 UTC (permalink / raw)
To: b-liu, gregkh, stern; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: core: unlink urbs from the tail of the endpoint's urb_list
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-core-unlink-urbs-from-the-tail-of-the-endpoint-s-urb_list.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 2eac13624364db5b5e1666ae0bb3a4d36bc56b6e Mon Sep 17 00:00:00 2001
From: Bin Liu <b-liu@ti.com>
Date: Tue, 25 Jul 2017 09:31:33 -0500
Subject: usb: core: unlink urbs from the tail of the endpoint's urb_list
From: Bin Liu <b-liu@ti.com>
commit 2eac13624364db5b5e1666ae0bb3a4d36bc56b6e upstream.
While unlink an urb, if the urb has been programmed in the controller,
the controller driver might do some hw related actions to tear down the
urb.
Currently usb_hcd_flush_endpoint() passes each urb from the head of the
endpoint's urb_list to the controller driver, which could make the
controller driver think each urb has been programmed and take the
unnecessary actions for each urb.
This patch changes the behavior in usb_hcd_flush_endpoint() to pass the
urbs from the tail of the list, to avoid any unnecessary actions in an
controller driver.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/core/hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1877,7 +1877,7 @@ void usb_hcd_flush_endpoint(struct usb_d
/* No more submits can occur */
spin_lock_irq(&hcd_urb_list_lock);
rescan:
- list_for_each_entry (urb, &ep->urb_list, urb_list) {
+ list_for_each_entry_reverse(urb, &ep->urb_list, urb_list) {
int is_in;
if (urb->unlinked)
Patches currently in stable-queue which might be from b-liu@ti.com are
queue-4.9/usb-core-unlink-urbs-from-the-tail-of-the-endpoint-s-urb_list.patch
queue-4.9/usb-musb-fix-tx-fifo-flush-handling-again.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-14 0:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 22:19 Patch "usb: core: unlink urbs from the tail of the endpoint's urb_list" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.