aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <[email protected]>2020-10-25 18:45:49 +0100
committerJohan Hovold <[email protected]>2020-11-04 11:01:14 +0100
commitc01d2c58698f710c9e13ba3e2d296328606f74fd (patch)
tree23bf521b773d543a083d051a6e3ffe657ae8d827
parent7353cad7ee4deaefc16e94727e69285563e219f6 (diff)
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: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.") Cc: stable <[email protected]> # 2.6.13 Acked-by: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
-rw-r--r--drivers/usb/serial/keyspan_pda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 17b60e5a9f1f..d6ebde779e85 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -548,7 +548,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;
}