]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: ocp: add UPF_NO_THRE_TEST flag for serial ports
authorJonathan Lemon <bsd@fb.com>
Wed, 9 Mar 2022 22:34:27 +0000 (14:34 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Mar 2022 04:28:27 +0000 (20:28 -0800)
commitdec737da45593ae7db69e502d71eeea862d83af6
tree8441c0d8febb1217c983e9ee506a30ba3bb56b95
parentf7b3701c6e8618e38fe8944654121df6b5392976
ptp: ocp: add UPF_NO_THRE_TEST flag for serial ports

The serial port driver attempts to test for correct THRE behavior
on startup.  However, it does this by disabling interrupts, and
then intentionally trying to trigger an interrupt in order to see
if the IIR bit is set in the UART.

However, in this FPGA design, the UART interrupt is generated
through the MSI vector, so when interrupts are re-enabled after
the test, the DMAR-IR reports an unhandled IRTE entry, since
no irq handler is installed at this point - it is installed
after the test.

This only happens on the /second/ open of the UART, since on the
first open, the x86_vector has installed and activated by the
driver probe, and is correctly handled.  When the serial port is
closed for the first time, this vector is deactivated and removed,
leading to this error.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/r/20220309223427.34745-1-jonathan.lemon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_ocp.c