Skip to content
Snippets Groups Projects
Commit 8e8dce06 authored by David VomLehn's avatar David VomLehn Committed by Greg Kroah-Hartman
Browse files

USB: use kfifo to buffer usb-generic serial writes


When do_output_char() attempts to write a carriage return/line feed sequence,
it first checks to see how much buffer room is available. If there are at least
two characters free, it will write the carriage return/line feed with two calls
to tty_put_char(). It calls the tty_operation functions write() for devices that
don't support the tty_operations function put_char(). If the USB generic serial
device's write URB is not in use, it will return the buffer size when asked how
much room is available. The write() of the carriage return will cause it to mark
the write URB busy, so the subsequent write() of the line feed will be ignored.

This patch uses the kfifo infrastructure to implement a write FIFO that
accurately returns the amount of space available in the buffer.

Signed-off-by: default avatarDavid VomLehn <dvomlehn@cisco.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 74aee796
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment