mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
USB: omninet: fix write_room
commit694c6301e5upstream. Fix regression introduced by commit507ca9bc04([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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a2cb6c3022
commit
5ccce01507
@@ -315,7 +315,7 @@ static int omninet_write_room(struct tty_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);
|
||||
|
||||
Reference in New Issue
Block a user