Powerpc 8xx CPM_UART desynchronisation
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 24 Sep 2012 06:17:08 +0000 (08:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2012 20:39:39 +0000 (13:39 -0700)
This patch fixes a desynchronisation problem with CPM UART driver on
Powerpc MPC8xx. The problem happens if data is received before the device
is open by the user application.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/cpm_uart/cpm_uart_core.c

index b418947b7107b9efe81f95351d06eadc0719fd72..46af6e47f0617c824773d8540ecd3f7771ef3e52 100644 (file)
@@ -417,6 +417,7 @@ static int cpm_uart_startup(struct uart_port *port)
                        clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR);
                        clrbits16(&pinfo->sccp->scc_sccm, UART_SCCM_RX);
                }
+               cpm_uart_initbd(pinfo);
                cpm_line_cr_cmd(pinfo, CPM_CR_INIT_TRX);
        }
        /* Install interrupt handler. */