serial: sh-sci: Clear (H)SCIF timeout and overrun during reset
[linux-2.6-block.git] / drivers / tty / serial / sh-sci.c
index 408f706393debf8206c4a27d6590756edacdf8dc..432d9acabf7fc5d14f21fca627b94e0ad34dc506 100644 (file)
@@ -2156,6 +2156,11 @@ static void sci_reset(struct uart_port *port)
        sci_clear_SCxSR(port,
                        SCxSR_RDxF_CLEAR(port) & SCxSR_ERROR_CLEAR(port) &
                        SCxSR_BREAK_CLEAR(port));
+       if (sci_getreg(port, SCLSR)->size) {
+               status = serial_port_in(port, SCLSR);
+               status &= ~(SCLSR_TO | SCLSR_ORER);
+               serial_port_out(port, SCLSR, status);
+       }
 }
 
 static void sci_set_termios(struct uart_port *port, struct ktermios *termios,