usb: r8a66597-hcd: select a different endpoint on timeout
authorChris Brandt <chris.brandt@renesas.com>
Thu, 27 Apr 2017 19:12:02 +0000 (12:12 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Sep 2017 17:30:42 +0000 (18:30 +0100)
commit3cb4b35aa31a118a88db0c3f4520fcfb45c51eb4
treeb9485533117fc190149505ffa28d6525c87a42b3
parentb11d25efd350cfe488590cc8420feffc623e3ade
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/r8a66597-hcd.c