Skip to content

Commit c17c405

Browse files
jlemonkuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 87ed3de commit c17c405

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ptp/ptp_ocp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ ptp_ocp_serial_line(struct ptp_ocp *bp, struct ocp_resource *r)
14101410
uart.port.mapbase = pci_resource_start(pdev, 0) + r->offset;
14111411
uart.port.irq = pci_irq_vector(pdev, r->irq_vec);
14121412
uart.port.uartclk = 50000000;
1413-
uart.port.flags = UPF_FIXED_TYPE | UPF_IOREMAP;
1413+
uart.port.flags = UPF_FIXED_TYPE | UPF_IOREMAP | UPF_NO_THRE_TEST;
14141414
uart.port.type = PORT_16550A;
14151415

14161416
return serial8250_register_8250_port(&uart);

0 commit comments

Comments
 (0)