serial: core: fix console problems on uart_close
authorRob Herring <[email protected]>
Mon, 24 Oct 2016 20:56:49 +0000 (15:56 -0500)
committerGreg Kroah-Hartman <[email protected]>
Thu, 27 Oct 2016 14:02:13 +0000 (16:02 +0200)
Commit 761ed4a94582 ('tty: serial_core: convert uart_close to use
tty_port_close') started setting the ttyport console flag for serial
drivers. This is causing crashes, hangs, or garbage output on several
platforms because the serial shutdown is skipped and IRQs are left
enabled.

Partially revert commit 761ed4a94582 and drop reporting UART tty_ports
as a console leaving the console handling to the serial_core as it was
before.

Fixes: 761ed4a94582ab29 ("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: Niklas Söderlund <[email protected]>
Reported-by: Mike Galbraith <[email protected]>
Reported-by: Mugunthan V N <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/tty/serial/serial_core.c

index 6e4f63627479db8d33547ef18fd1e6e365f5bdb7..664c99aeeca58380789bf036f8044e3709760a88 100644 (file)
@@ -2746,8 +2746,6 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
        uport->cons = drv->cons;
        uport->minor = drv->tty_driver->minor_start + uport->line;
 
-       port->console = uart_console(uport);
-
        /*
         * If this port is a console, then the spinlock is already
         * initialised.