public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -rt] buggy UART fix
@ 2006-02-27 15:24 Steven Rostedt
  2006-02-28 19:45 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2006-02-27 15:24 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Thomas Gleixner, LKML


Ingo,

I'm not sure if this is the correct fix, but it fixes a problem on one of
our boards.  The uart does't set the IIR register upon receiving an
interrupt for transmit.  Thus we get processes stuck waiting to send
data out.

This doesn't seem to be a problem on vanilla, and I'm not sure why.
Perhaps the scheduling doesn't ever let the transmit buffer get full? Well
I haven't look too much into the vanilla side.

This patch forces the processing of the interrupt even if the iir doesn't
show that there was an interrupt, iff the uart has been detected as buggy
(which our board's uart is ) and the interrupt hasn't already handled
it.

-- Steve

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.15-rt17/drivers/serial/8250.c
===================================================================
--- linux-2.6.15-rt17.orig/drivers/serial/8250.c	2006-02-27 10:20:31.000000000 -0500
+++ linux-2.6.15-rt17/drivers/serial/8250.c	2006-02-27 10:20:53.000000000 -0500
@@ -1344,6 +1344,17 @@ static irqreturn_t serial8250_interrupt(
 				"irq%d\n", irq);
 			break;
 		}
+		/*
+		 * If we have a buggy TX line, that doesn't
+		 * notify us via iir that we need to transmit
+		 * then force the call.
+		 */
+		if (!handled && (up->bugs & UART_BUG_TXEN)) {
+			spin_lock(&up->port.lock);
+			serial8250_handle_port(up, regs);
+			spin_unlock(&up->port.lock);
+		}
+
 	} while (l != end);

 	spin_unlock(&i->lock);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-28 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 15:24 [PATCH -rt] buggy UART fix Steven Rostedt
2006-02-28 19:45 ` Ingo Molnar
2006-02-28 20:40   ` Ingo Molnar
2006-02-28 21:26     ` Paul Fulghum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox