lkml.org 
[lkml]   [2017]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.10 099/139] usb: r8a66597-hcd: select a different endpoint on timeout
    Date
    From: Chris Brandt <chris.brandt@renesas.com>

    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: Willy Tarreau <w@1wt.eu>
    ---
    drivers/usb/host/r8a66597-hcd.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
    index 6656dfd..4105f7f 100644
    --- a/drivers/usb/host/r8a66597-hcd.c
    +++ b/drivers/usb/host/r8a66597-hcd.c
    @@ -1786,6 +1786,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,
    @@ -1795,7 +1796,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);

    --
    2.8.0.rc2.1.gbe9624a
    \
     
     \ /
      Last update: 2017-11-01 22:46    [W:6.947 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site