lkml.org 
[lkml]   [2006]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] serial: fix UART_BUG_TXEN test
  Hi,

There is a bug in the UART_BUG_TXEN test: It gives false positives in
case the UART_IER_THRI bit is set. Fixed by explicitly clearing the
UART_IER register first.

It may trigger with an active serial console as serial console writes
set the UART_IER_THRI bit.

cheers,

Gerd
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
--- linux-2.6.16/drivers/serial/8250.c.serial 2006-04-05 12:04:31.000000000 +0200
+++ linux-2.6.16/drivers/serial/8250.c 2006-04-05 12:04:49.000000000 +0200
@@ -1712,6 +1712,7 @@
* Do a quick test to see if we receive an
* interrupt when we enable the TX irq.
*/
+ serial_outp(up, UART_IER, 0);
serial_outp(up, UART_IER, UART_IER_THRI);
lsr = serial_in(up, UART_LSR);
iir = serial_in(up, UART_IIR);
\
 
 \ /
  Last update: 2006-04-05 12:26    [W:0.067 / U:2.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site