Thread (6 messages) 6 messages, 3 authors, 2008-08-12

Re: [PATCH] serial 8250: tighten test for using backup timer

From: Alex Williamson <hidden>
Date: 2008-08-05 20:07:24
Also in: lkml

Hi Will,

On Tue, 2008-08-05 at 12:44 +0100, Will Newton wrote:
Hi,

Sorry to not have picked up on this earlier, but this change seems to
break an old DesignWare UART I have in an SoC here. It has a number of
known issues, one of which is it does not appropriately reassert THRE.

What seems to happen is that the first time the port is opened the
code tests for incorrect reassertion of THRE and correctly sets up the
backup timer. The port is closed and subsequently reopened and this
time around the new logic prevents the backup timer from being
enabled. I'm not 100% sure of the details of the bug that is being
worked around here, but it appears that the second time the port is
opened it is not possible to detect the bug because the previous THRE
condition has already been acknowledged.

The attached patch fixes the problem for me and attempts to preserve
the new behaviour at the same time. Comments?
It would be nice if there was a simple procedure we could do on the UART
to reset it to a state so the test works repeatedly.  However, with all
the buggy UARTs out there, that could end up disturbing someone else.

This change works for me, though it is using up a bit in the bugs field;
not that we seem to be allocating them at any great rate.  I think it
would be worthy of a comment in the code to understand why this new
block exists outside the test so we don't need to refer back to the
commit changeset.

Acked-by: Alex Williamson <redacted>

Thanks, Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help