Skip to content

Commit 4c7a6dd

Browse files
seebegregkh
authored andcommitted
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: 5d30435 ("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>
1 parent 42c8b4b commit 4c7a6dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/usb/host/r8a66597-hcd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,7 @@ static void r8a66597_td_timer(unsigned long _r8a66597)
17851785
pipe = td->pipe;
17861786
pipe_stop(r8a66597, pipe);
17871787

1788+
/* Select a different address or endpoint */
17881789
new_td = td;
17891790
do {
17901791
list_move_tail(&new_td->queue,
@@ -1794,7 +1795,8 @@ static void r8a66597_td_timer(unsigned long _r8a66597)
17941795
new_td = td;
17951796
break;
17961797
}
1797-
} while (td != new_td && td->address == new_td->address);
1798+
} while (td != new_td && td->address == new_td->address &&
1799+
td->pipe->info.epnum == new_td->pipe->info.epnum);
17981800

17991801
start_transfer(r8a66597, new_td);
18001802

0 commit comments

Comments
 (0)