|
@@ -172,12 +172,16 @@ static int uart_startup(struct tty_struct *tty, struct uart_state *state, int in
|
|
|
|
|
|
retval = uport->ops->startup(uport);
|
|
|
if (retval == 0) {
|
|
|
- if (init_hw) {
|
|
|
- /*
|
|
|
- * Initialise the hardware port settings.
|
|
|
- */
|
|
|
- uart_change_speed(tty, state, NULL);
|
|
|
+ if (uart_console(uport) && uport->cons->cflag) {
|
|
|
+ tty->termios->c_cflag = uport->cons->cflag;
|
|
|
+ uport->cons->cflag = 0;
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * Initialise the hardware port settings.
|
|
|
+ */
|
|
|
+ uart_change_speed(tty, state, NULL);
|
|
|
|
|
|
+ if (init_hw) {
|
|
|
/*
|
|
|
* Setup the RTS and DTR signals once the
|
|
|
* port is open and ready to respond.
|
|
@@ -1481,22 +1485,12 @@ static void uart_update_termios(struct tty_struct *tty,
|
|
|
{
|
|
|
struct uart_port *port = state->uart_port;
|
|
|
|
|
|
- if (uart_console(port) && port->cons->cflag) {
|
|
|
- tty->termios->c_cflag = port->cons->cflag;
|
|
|
- port->cons->cflag = 0;
|
|
|
- }
|
|
|
-
|
|
|
/*
|
|
|
* If the device failed to grab its irq resources,
|
|
|
* or some other error occurred, don't try to talk
|
|
|
* to the port hardware.
|
|
|
*/
|
|
|
if (!(tty->flags & (1 << TTY_IO_ERROR))) {
|
|
|
- /*
|
|
|
- * Make termios settings take effect.
|
|
|
- */
|
|
|
- uart_change_speed(tty, state, NULL);
|
|
|
-
|
|
|
/*
|
|
|
* And finally enable the RTS and DTR signals.
|
|
|
*/
|