]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: ftdi_sio: Keep going when write errors are encountered.
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 18 Nov 2009 03:10:48 +0000 (19:10 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:22:14 +0000 (10:22 -0800)
commit144096993162a13f165f21aa89d7d95603b25c78
tree759bd93d2235e7390ed9c8dd2027e59b61363dd0
parent774430b67775145d69362ca807d5f25db019919e
USB: ftdi_sio: Keep going when write errors are encountered.

commit 0de6ab8b91f2e1e8e7fc66a8b5c5e8ca82ea16b7 upstream.

The use of urb->actual_length to update tx_outstanding_bytes
implicitly assumes that the number of bytes actually written is the
same as the number of bytes we tried to write.  On error that
assumption is violated so just use transfer_buffer_length the number
of bytes we intended to write to the device.

If an error occurs we need to fall through and call
usb_serial_port_softint to wake up processes waiting in
tty_wait_until_sent.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/ftdi_sio.c