Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3950
b: refs/heads/master
c: 0dd7a1a
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jun 29, 2005
1 parent bd37ee0 commit f502b17
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5f4644e6c8ba21666128603e4e92544d3cd740d
refs/heads/master: 0dd7a1aed7c34a39917c4faf75b4230c169e809b
17 changes: 17 additions & 0 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ static int uart_startup(struct uart_state *state, int init_hw)
uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR);
}

if (info->flags & UIF_CTS_FLOW) {
spin_lock_irq(&port->lock);
if (!(port->ops->get_mctrl(port) & TIOCM_CTS))
info->tty->hw_stopped = 1;
spin_unlock_irq(&port->lock);
}

info->flags |= UIF_INITIALIZED;

clear_bit(TTY_IO_ERROR, &info->tty->flags);
Expand Down Expand Up @@ -1134,6 +1141,16 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios
spin_unlock_irqrestore(&state->port->lock, flags);
}

/* Handle turning on CRTSCTS */
if (!(old_termios->c_cflag & CRTSCTS) && (cflag & CRTSCTS)) {
spin_lock_irqsave(&state->port->lock, flags);
if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) {
tty->hw_stopped = 1;
state->port->ops->stop_tx(state->port, 0);
}
spin_unlock_irqrestore(&state->port->lock, flags);
}

#if 0
/*
* No need to wake up processes in open wait, since they
Expand Down

0 comments on commit f502b17

Please sign in to comment.