9ad221a558
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 |
||
---|---|---|
.. | ||
controller | ||
gadget | ||
input | ||
misc | ||
net | ||
quirk | ||
serial | ||
storage | ||
template | ||
video | ||
wlan | ||
ufm_ioctl.h | ||
uftdiio.h | ||
uled_ioctl.h | ||
usb_bus.h | ||
usb_busdma.c | ||
usb_busdma.h | ||
usb_cdc.h | ||
usb_controller.h | ||
usb_core.c | ||
usb_core.h | ||
usb_debug.c | ||
usb_debug.h | ||
usb_dev.c | ||
usb_dev.h | ||
usb_device.c | ||
usb_device.h | ||
usb_dynamic.c | ||
usb_dynamic.h | ||
usb_endian.h | ||
usb_error.c | ||
usb_freebsd_loader.h | ||
usb_freebsd.h | ||
usb_generic.c | ||
usb_generic.h | ||
usb_handle_request.c | ||
usb_hid.c | ||
usb_hub.c | ||
usb_hub.h | ||
usb_if.m | ||
usb_ioctl.h | ||
usb_lookup.c | ||
usb_mbuf.c | ||
usb_mbuf.h | ||
usb_msctest.c | ||
usb_msctest.h | ||
usb_parse.c | ||
usb_pci.h | ||
usb_pf.c | ||
usb_pf.h | ||
usb_process.c | ||
usb_process.h | ||
usb_request.c | ||
usb_request.h | ||
usb_transfer.c | ||
usb_transfer.h | ||
usb_util.c | ||
usb_util.h | ||
usb.h | ||
usbdevs | ||
usbdi_util.h | ||
usbdi.h | ||
usbhid.h |