]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ns8250: Check if flush via FCR succeeded
authorColin Percival <cperciva@FreeBSD.org>
Thu, 13 Oct 2022 18:01:03 +0000 (11:01 -0700)
committerColin Percival <cperciva@FreeBSD.org>
Tue, 18 Oct 2022 06:02:21 +0000 (23:02 -0700)
commitc4b68e7e53bb352be3fa16995b99764c03097e66
tree512a9b2d9507dd64309b7cb0e99f8d7bb38b4c6e
parent782105f7c89821552304245d71e107b867a3e934
ns8250: Check if flush via FCR succeeded

The emulated UART in the Firecracker VMM (aka the implementation in the
rust-vmm/vm-superio project) includes FIFOs but does not implement the
FCR register, which is used by ns8250_flush to flush the FIFOs.

Check the LSR to see if there is still data in the FIFOs and call
ns8250_drain if necessary.

Discussed with: emaste, imp, jrtc27
Sponsored by: https://patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D36979
sys/dev/uart/uart_dev_ns8250.c