aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2007-08-22 17:01:18 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-22 22:52:44 -0400
commitad4c2aa6354fad5316565b1cff57f80db0e04db8 (patch)
treefd4e320385760065e3f04b017093ff9495fc46b5 /include
parent999999616e45c603da45ee2667741fb7348629a5 (diff)
Serial 8250: handle saving the clear-on-read bits from the LSR and MSR
Reading the LSR clears the break, parity, frame error, and overrun bits in the 8250 chip, but these are not being saved in all places that read the LSR. Same goes for the MSR delta bits. Save the LSR bits off whenever the lsr is read so they can be handled later in the receive routine. Save the MSR bits to be handled in the modem status routine. Also, clear the stored bits and clear the interrupt registers before enabling interrupts, to avoid handling old values of the stored bits in the interrupt routines. [akpm@linux-foundation.org: clean up pre-existing code] Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Cc: Yinghai Lu <yinghai.lu@sun.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/serial_reg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 1c5ed7d92b0f..96c0d93fc2ca 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -118,6 +118,7 @@
118#define UART_LSR_PE 0x04 /* Parity error indicator */ 118#define UART_LSR_PE 0x04 /* Parity error indicator */
119#define UART_LSR_OE 0x02 /* Overrun error indicator */ 119#define UART_LSR_OE 0x02 /* Overrun error indicator */
120#define UART_LSR_DR 0x01 /* Receiver data ready */ 120#define UART_LSR_DR 0x01 /* Receiver data ready */
121#define UART_LSR_BRK_ERROR_BITS 0x1E /* BI, FE, PE, OE bits */
121 122
122#define UART_MSR 6 /* In: Modem Status Register */ 123#define UART_MSR 6 /* In: Modem Status Register */
123#define UART_MSR_DCD 0x80 /* Data Carrier Detect */ 124#define UART_MSR_DCD 0x80 /* Data Carrier Detect */