Ian Lepore 9ad221a558 Add tsw_busy support to usb_serial (ucom).
The tty layer uses tsw_busy to poll for busy/idle status of the transmitter
hardware during close() and tcdrain(). The ucom layer defines ULSR_TXRDY and
ULSR_TSRE bits for the line status register; when both are set, the
transmitter is idle. Not all chip drivers maintain those bits in the sc_lsr
field, and if the bits never get set the transmitter will always appear
busy, causing hangs in tcdrain().

These changes add a new sc_flag bit, UCOM_FLAG_LSRTXIDLE. When this flag is
set, ucom_busy() uses the lsr bits to return busy vs. idle state, otherwise
it always returns idle (which is effectively what happened before this
change because tsw_busy wasn't implemented).

For the uftdi chip driver, these changes stop masking out the tx idle bits
when processing the status register (because now they're useful), and it
calls ucom_use_lsr_txbits() to indicate the bits are maintained by the
driver and can be used by ucom_busy().

Differential Revision:	https://reviews.freebsd.org/D9183
2017-02-05 15:45:31 +00:00
..
2017-01-05 21:28:25 +00:00
2017-01-28 02:22:15 +00:00
2017-01-16 03:03:47 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 17:11:33 +00:00
2017-01-28 02:22:15 +00:00
2017-02-03 05:15:08 +00:00
2016-08-09 19:32:06 +00:00
2016-05-03 03:41:25 +00:00
2016-10-25 16:28:30 +00:00
2016-08-09 19:32:06 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-11-17 14:43:13 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 16:40:51 +00:00
2017-01-28 02:22:15 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2016-12-12 16:43:31 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2017-01-28 02:22:15 +00:00
2017-01-28 02:22:15 +00:00
2016-07-21 15:48:41 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-12-04 04:04:57 +00:00
2016-05-03 03:41:25 +00:00
2016-09-05 23:12:24 +00:00
2016-05-03 03:41:25 +00:00
2016-08-09 19:32:06 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-12-23 20:14:05 +00:00
2016-05-03 03:41:25 +00:00
2017-01-23 21:09:27 +00:00
2017-01-28 02:22:15 +00:00
2017-01-12 18:05:12 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-09-22 22:51:11 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2016-10-17 10:20:38 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2017-01-16 15:23:55 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-08-09 19:32:06 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 02:22:15 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00
2016-05-02 16:47:28 +00:00
2016-05-20 08:58:06 +00:00
2016-05-02 16:47:28 +00:00
2016-12-30 16:26:54 +00:00
2016-05-03 03:41:25 +00:00
2016-05-03 03:41:25 +00:00