aboutsummaryrefslogtreecommitdiff
path: root/sys/xen
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2024-01-12 22:27:07 +0000
committerMarius Strobl <marius@FreeBSD.org>2024-01-18 20:14:56 +0000
commite7fe996990a8bdb13632a5137731dc57549f05be (patch)
tree71a2c2ca1a26c025f541b02db2da6759208b5060 /sys/xen
parentbf81fc51ccf04a6ae58f7c4d281266d5ab59d4e0 (diff)
downloadsrc-e7fe996990a8bdb13632a5137731dc57549f05be.tar.gz
src-e7fe996990a8bdb13632a5137731dc57549f05be.zip
uart(4): Honor hardware state of NS8250-class for tsw_busy
In 9750d9e5, I brought the equivalent of the TS_BUSY flag back in a mostly hardware-agnostic way in order to fix tty_drain() and, thus, TIOCDRAIN for UARTs with TX FIFOs. This proved to be sufficient for fixing the regression reported. So in light of the release cycle of FreeBSD 10.3, I decided that this change was be good enough for the time being and opted to go with the smallest possible yet generic (for all UARTs driven by uart(4)) solution addressing the problem at hand. However, at least for the NS8250-class the above isn't a complete fix as these UARTs only trigger an interrupt when the TX FIFO became empty. At this point, there still can be an outstanding character left in the transmit shift register as indicated via the LSR. Thus, this change adds the 3rd (besides the tty(4) and generic uart(4) bits) part I had in my tree ever since, adding a uart_txbusy method to be queried in addition for tsw_busy and hooking it up as appropriate for the NS8250-class. As it turns out, the exact equivalent of this 3rd part later on was implemented for uftdi(4) in 9ad221a5. While at it, explain the rational behind the deliberately missing locking in uart_tty_busy() (also applying to the generic sc_txbusy testing already present). (cherry picked from commit 353e4c5a068d06b0d6dcfa9eb736ecb16e9eae45)
Diffstat (limited to 'sys/xen')
0 files changed, 0 insertions, 0 deletions