serial: sh-sci: Fix fifo stall on SH7760/SH7780/SH7785 SCIF.
authorYutaro Ebihara <ebiharaml@si-linux.com>
Tue, 11 Mar 2008 04:58:50 +0000 (13:58 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 11 Mar 2008 04:58:50 +0000 (13:58 +0900)
There was an off-by-1 in the SCRFDR calculation that caused writes over
128-bytes to hang in the FIFO. Fix it up.

Signed-off-by: Yutaro Ebihara <ebiharaml@si-linux.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/serial/sh-sci.c

index a8c116b80bffc18d8fd0e5c8cf43813076581e67..9d244d1644e14031d9cf24280c7280449a9a15cc 100644 (file)
@@ -414,12 +414,12 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
     defined(CONFIG_CPU_SUBTYPE_SH7785)
 static inline int scif_txroom(struct uart_port *port)
 {
-       return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0x7f);
+       return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0xff);
 }
 
 static inline int scif_rxroom(struct uart_port *port)
 {
-       return sci_in(port, SCRFDR) & 0x7f;
+       return sci_in(port, SCRFDR) & 0xff;
 }
 #else
 static inline int scif_txroom(struct uart_port *port)