Skip to content

Commit

Permalink
ptp: ocp: add UPF_NO_THRE_TEST flag for serial ports
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jlemon committed Mar 8, 2022
1 parent fa7dc63 commit 20af5fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Time-Card/DRV/ptp_ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ ptp_ocp_serial_line(struct ptp_ocp *bp, struct ocp_resource *r)
uart.port.mapbase = pci_resource_start(pdev, 0) + r->offset;
uart.port.irq = pci_irq_vector(pdev, r->irq_vec);
uart.port.uartclk = 50000000;
uart.port.flags = UPF_FIXED_TYPE | UPF_IOREMAP;
uart.port.flags = UPF_FIXED_TYPE | UPF_IOREMAP | UPF_NO_THRE_TEST;
uart.port.type = PORT_16550A;

return serial8250_register_8250_port(&uart);
Expand Down

0 comments on commit 20af5fa

Please sign in to comment.