Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163855
b: refs/heads/master
c: ba15ab0
h: refs/heads/master
i:
  163853: be187e7
  163851: c4ac605
  163847: 901bb70
  163839: 820908f
v: v3
  • Loading branch information
Deepak Saxena authored and Live-CD User committed Sep 19, 2009
1 parent cde8a47 commit cec7749
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b01478f97a671c97fad9254aa91892209b018b5
refs/heads/master: ba15ab0e8de0d4439a91342ad52d55ca9e313f3d
32 changes: 18 additions & 14 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,11 +2068,29 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
struct tty_port *port = &state->port;
struct device *tty_dev;
struct uart_match match = {uport, drv};
struct ktermios termios;

mutex_lock(&port->mutex);

if (!console_suspend_enabled && uart_console(uport)) {
/* no need to resume serial console, it wasn't suspended */
/*
* First try to use the console cflag setting.
*/
memset(&termios, 0, sizeof(struct ktermios));
termios.c_cflag = uport->cons->cflag;
/*
* If that's unset, use the tty termios setting.
*/
if (termios.c_cflag == 0)
termios = *state->port.tty->termios;
else {
termios.c_ispeed = termios.c_ospeed =
tty_termios_input_baud_rate(&termios);
termios.c_ispeed = termios.c_ospeed =
tty_termios_baud_rate(&termios);
}
uport->ops->set_termios(uport, &termios, NULL);
mutex_unlock(&port->mutex);
return 0;
}
Expand All @@ -2089,20 +2107,6 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
* Re-enable the console device after suspending.
*/
if (uart_console(uport)) {
struct ktermios termios;

/*
* First try to use the console cflag setting.
*/
memset(&termios, 0, sizeof(struct ktermios));
termios.c_cflag = uport->cons->cflag;

/*
* If that's unset, use the tty termios setting.
*/
if (port->tty && termios.c_cflag == 0)
termios = *port->tty->termios;

uart_change_pm(state, 0);
uport->ops->set_termios(uport, &termios, NULL);
console_start(uport->cons);
Expand Down

0 comments on commit cec7749

Please sign in to comment.