opnsense-src/sys/arm
Marius Strobl 8595e76a9f 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)
2024-01-18 21:14:46 +01:00
..
allwinner arm/allwinner: fix variables initialization in clkng 2023-10-18 16:37:35 +02:00
altera/socfpga sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
annapurna/alpine sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
arm identcpu: Let the hw.model be readable in capability mode 2024-01-11 09:19:08 -05:00
broadcom/bcm2835 sys: Remove SND_DECLARE_FILE 2023-08-18 13:05:12 -07:00
conf release: update stable/14 following branching from main 2023-08-24 19:07:33 -04:00
freescale sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
include arm: Update declarations for arm_dcache_align{,_mask} 2023-11-16 10:07:27 -05:00
mv Remove a few more stray __FBSDID uses 2023-10-24 10:08:46 -07:00
nvidia uart(4): Honor hardware state of NS8250-class for tsw_busy 2024-01-18 21:14:46 +01:00
qemu sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
qualcomm sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rockchip sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
ti sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
xilinx sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00