Re: [PATCH] 8250 UART backup timer



Alex Williamson wrote:
The patch below works around a minor bug found in the UART of the
remote management card used in many HP ia64 and parisc servers (aka the
Diva UARTs). The problem is that the UART does not reassert the THRE
interrupt if it has been previously cleared and the IIR THRI bit is
re-enabled. This can produce a very annoying failure mode when used as
a serial console, allowing a boot/reboot to hang indefinitely until an
RX interrupt kicks it into working again (ie. an unattended reboot could
stall).

To solve this problem, a backup timer is introduced that runs
alongside the standard interrupt driven mechanism. This timer wakes up
periodically, checks for a hang condition and gets characters moving
again. This backup mechanism is only enabled if the UART is detected as
having this problem, so systems without these UARTs will have no
additional overhead.

This version of the patch incorporates previous comments from Pavel
and removes races in the bug detection code. The test is now done
before the irq linking to prevent races with interrupt handler clearing
the THRE interrupt. Short delays and syncs are also added to ensure the
device is able to update register state before the result is tested.
Comments? Thanks,


I have seen this same bug in soft UART IP from "a major vendor."

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] 8250 UART backup timer
    ... Diva UARTs). ... RX interrupt kicks it into working again (ie. an unattended reboot could ... static void serial8250_timeout ... If the "interrupt" for this port doesn't correspond with any ...
    (Linux-Kernel)
  • Re: Killing a blocking thread ?
    ... Assume that the async event is fired by an interrupt. ... The system remembers the fact that you wait - than your thread is marked as "needs no CPU time". ... When an interrupt occures the system checks his list of "waiters" and if a thread is found waiting for that specific thing ... But newer UARTs have a buffer of some bytes - and those bytes made the difference. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Serial related oops
    ... You will be vulnerable to this unless you lock out the interrupt ... in which case the TX irq test will of ... in IRQ enabling and delivery make things worse. ... code frequently turn on one or more UARTs and leave them in an unknown ...
    (Linux-Kernel)
  • Re: Changeing SYSINTR_MAXIMUM
    ... If not, i.e. if you have enough interrupt lines for all your UARTs, make ... special serial driver and probably special OEM code to handle the interrupt ...
    (microsoft.public.windowsce.platbuilder)