提交 cae167d3 编写于 作者: Y Yutaro Ebihara 提交者: Paul Mundt

serial: sh-sci: Fix fifo stall on SH7760/SH7780/SH7785 SCIF.

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: NYutaro Ebihara <ebiharaml@si-linux.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 2f44bbb4
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册