diff options
author | Johan Hovold <johan@kernel.org> | 2020-10-25 20:45:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-29 15:47:07 +0300 |
commit | 73e61d798ea53c0a03414f926a9b0453e38debce (patch) | |
tree | 5c21a3e2e962802df75e9c4e7a6e9e8f93bd7211 | |
parent | 06d08b408ace4fa06de2f974f14f1bee88745da7 (diff) | |
download | linux-73e61d798ea53c0a03414f926a9b0453e38debce.tar.xz |
USB: serial: keyspan_pda: fix stalled writes
commit c01d2c58698f710c9e13ba3e2d296328606f74fd upstream.
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: 507ca9bc0476 ("[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/keyspan_pda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index d62547a90a6f..f4e5267f54d8 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -552,7 +552,7 @@ static int keyspan_pda_write(struct tty_struct *tty, rc = count; exit: - if (rc < 0) + if (rc <= 0) set_bit(0, &port->write_urbs_free); return rc; } |