]> err.no Git - linux-2.6/commitdiff
[POWERPC] Don't shutdown TX on mpc5200 serial port if it is a console
authorGrant Likely <grant.likely@secretlab.ca>
Sun, 6 May 2007 15:38:51 +0000 (01:38 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 7 May 2007 10:31:15 +0000 (20:31 +1000)
If the serial port gets shut down, then console output stalls.  9 out
of 10 kernel hackers agree, this is a bad thing.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/serial/mpc52xx_uart.c

index f8c1761eb57f5477f540a3377a8b0a592a0b5982..35f8b86cc78fe3c9acb75626ff913b696d478b30 100644 (file)
@@ -257,9 +257,10 @@ mpc52xx_uart_shutdown(struct uart_port *port)
 {
        struct mpc52xx_psc __iomem *psc = PSC(port);
 
-       /* Shut down the port, interrupt and all */
+       /* Shut down the port.  Leave TX active if on a console port */
        out_8(&psc->command,MPC52xx_PSC_RST_RX);
-       out_8(&psc->command,MPC52xx_PSC_RST_TX);
+       if (!uart_console(port))
+               out_8(&psc->command,MPC52xx_PSC_RST_TX);
 
        port->read_status_mask = 0;
        out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);