Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711761
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list |
| Date | 2017-08-15 04:00 +0200 |
| Message-ID | <uezjf-3jP-75@gated-at.bofh.it> (permalink) |
| References | <ueyGu-35K-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
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
@@ -1851,7 +1851,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)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 16/23] USB: Check for dropped connection before switching to full speed Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 15/23] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 07/23] USB: serial: option: add D-Link DWM-222 device ID Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 13/23] iio: accel: bmc150: Always restore device to normal mode after suspend-resume Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 18/23] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-08-15 04:00 +0200 Re: [PATCH 4.4 00/23] 4.4.83-stable review Guenter Roeck <linux@roeck-us.net> - 2017-08-15 12:50 +0200 Re: [PATCH 4.4 00/23] 4.4.83-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-15 20:10 +0200
csiph-web