mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
USB: serial: keyspan_pda: fix stalled writes
Make sure to clear the write-busy flag also in case no new data was
submitted due to lack of device buffer space so that writing is
resumed once space again becomes available.
Fixes: 507ca9bc04
("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.")
Cc: stable <stable@vger.kernel.org> # 2.6.13
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
7353cad7ee
commit
c01d2c5869
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ static int keyspan_pda_write(struct tty_struct *tty,
|
||||||
|
|
||||||
rc = count;
|
rc = count;
|
||||||
exit:
|
exit:
|
||||||
if (rc < 0)
|
if (rc <= 0)
|
||||||
set_bit(0, &port->write_urbs_free);
|
set_bit(0, &port->write_urbs_free);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue