summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/r8a66597-hcd.c
diff options
context:
space:
mode:
authorChris Brandt <chris.brandt@renesas.com>2017-04-27 12:12:02 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-26 07:13:10 +0200
commit4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9 (patch)
tree6fd1e21d4ecb24776563e1b652401c6bb4df1353 /drivers/usb/host/r8a66597-hcd.c
parent42c8b4b5fdca31b47d2c55e716f651e2600690ca (diff)
downloadlinux-stable-4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9.tar.gz
linux-stable-4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9.tar.bz2
linux-stable-4c7a6dd205cc7e6e7e95f5d7b7b0a9a7a3fcf5e9.zip
usb: r8a66597-hcd: select a different endpoint on timeout
commit 1f873d857b6c2fefb4dada952674aa01bcfb92bd upstream. If multiple endpoints on a single device have pending IN URBs and one endpoint times out due to NAKs (perfectly legal), select a different endpoint URB to try. The existing code only checked to see another device address has pending URBs and ignores other IN endpoints on the current device address. This leads to endpoints never getting serviced if one endpoint is using NAK as a flow control method. Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659") Signed-off-by: Chris Brandt <chris.brandt@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/r8a66597-hcd.c')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 4cbd0633c5c2..80fee152a275 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1785,6 +1785,7 @@ static void r8a66597_td_timer(unsigned long _r8a66597)
pipe = td->pipe;
pipe_stop(r8a66597, pipe);
+ /* Select a different address or endpoint */
new_td = td;
do {
list_move_tail(&new_td->queue,
@@ -1794,7 +1795,8 @@ static void r8a66597_td_timer(unsigned long _r8a66597)
new_td = td;
break;
}
- } while (td != new_td && td->address == new_td->address);
+ } while (td != new_td && td->address == new_td->address &&
+ td->pipe->info.epnum == new_td->pipe->info.epnum);
start_transfer(r8a66597, new_td);