]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
Serial 8250: handle saving the clear-on-read bits from the LSR and MSR
authorCorey Minyard <minyard@acm.org>
Wed, 22 Aug 2007 21:01:18 +0000 (14:01 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 23 Aug 2007 02:52:44 +0000 (19:52 -0700)
commitad4c2aa6354fad5316565b1cff57f80db0e04db8
treefd4e320385760065e3f04b017093ff9495fc46b5
parent999999616e45c603da45ee2667741fb7348629a5
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>
drivers/serial/8250.c
include/linux/serial_reg.h