diff options
author | Jarkko Huijts <jarkko.huijts@gmail.com> | 2012-10-10 15:05:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-25 09:42:26 -0700 |
commit | 6f602912c9d0c84c2edbd446dd9f72660b701605 (patch) | |
tree | 55f34e6658cab9f17f845ec9255a76e25f42ee9f /drivers/uwb/umc-bus.c | |
parent | bd066eef1aea5dd1f8e98934c4c6d21c5e0439c8 (diff) | |
download | linux-6f602912c9d0c84c2edbd446dd9f72660b701605.tar.bz2 |
usb: serial: ftdi_sio: Add missing chars_in_buffer function
The driver does not wait until the hardware buffer (for data from the PC to the
UART line) is drained when tcdrain or close is called in an application.
Solution: Implement a chars_in_buffer function that checks both the software
and hardware buffer. If the TEMT (TX empty) bit of the line status register
indicates the hw buffer is not empty, let the function return at least 1. This
has been verified to work correctly with an FT232RL. The check on the hw buffer
can not be done for the original SIO device.
Signed-off-by: Jarkko Huijts <jarkko.huijts@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uwb/umc-bus.c')
0 files changed, 0 insertions, 0 deletions