Re: Serial: UART_BUG_TXEN race conditions

From: Ingo van Lil
Date: Mon Jun 26 2006 - 16:51:35 EST


Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> schrieb:

1. What if the IIR actually equals UART_IIR_THRI at that point? The
read access will clear the interrupt condition and the workaround
will effect the actual opposite of its intention: Neither
serial8250_start_tx() nor the interrupt handler will start
transmitting characters for the ring buffer.

Gah, looks like you're right - reading the IIR will clear the transmit
pending interrupt, so we should probably just load the transmitter up
with characters anyway if the TEMT bit is set.

How about doing that on any controller, not just the buggy ones? It shouldn't cause any problems even on well-behaved UARTs, or could it?

This function is run under the port spinlock, so the interrupt handler
will be held off until it completes.

OK, great. Forget about my second concern, then.

Cheers,
Ingo


-
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/