Skip to content

Commit

Permalink
USB: serial: keyspan_pda: fix stalled writes
Browse files Browse the repository at this point in the history
commit c01d2c5 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: 507ca9b ("[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>
  • Loading branch information
jhovold authored and gregkh committed Dec 30, 2020
1 parent 3a24c8c commit 1254104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/keyspan_pda.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1254104

Please sign in to comment.