lkml.org 
[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[14/20] USB: omninet: fix write_room
    2.6.32-longterm review patch.  If anyone has any objections, please let me know.

    ------------------
    From: Johan Hovold <jhovold@gmail.com>

    commit 694c6301e515bad574af74b6552134c4d9dcb334 upstream.

    Fix regression introduced by commit 507ca9bc047666 ([PATCH] USB: add
    ability for usb-serial drivers to determine if their write urb is
    currently being used.) which inverted the logic in write_room so that it
    returns zero when the write urb is actually free.

    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/usb/serial/omninet.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)
    --- a/drivers/usb/serial/omninet.c
    +++ b/drivers/usb/serial/omninet.c
    @@ -317,7 +317,7 @@ static int omninet_write_room(struct tty
    int room = 0; /* Default: no room */

    /* FIXME: no consistent locking for write_urb_busy */
    - if (wport->write_urb_busy)
    + if (!wport->write_urb_busy)
    room = wport->bulk_out_size - OMNINET_HEADERLEN;

    dbg("%s - returns %d", __func__, room);



    \
     
     \ /
      Last update: 2012-01-10 21:37    [W:0.344 / U:0.064 seconds]
    ©2003-2014 Jasper Spaans. Advertise on this site