tty: Replace ASYNC_CTS_FLOW bit and update atomically
Replace ASYNC_CTS_FLOW bit in the tty_port::flags field with TTY_PORT_CTS_FLOW bit in the tty_port::iflags field. Add tty_port_set_cts_flow() helper to abstract the atomic bit ops. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

orang tua
e4d38f334a
melakukan
5604a98e2f
@@ -2083,13 +2083,11 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
|
||||
info->cor1 |= CyPARITY_NONE;
|
||||
|
||||
/* CTS flow control flag */
|
||||
if (cflag & CRTSCTS) {
|
||||
info->port.flags |= ASYNC_CTS_FLOW;
|
||||
tty_port_set_cts_flow(&info->port, cflag & CRTSCTS);
|
||||
if (cflag & CRTSCTS)
|
||||
info->cor2 |= CyCtsAE;
|
||||
} else {
|
||||
info->port.flags &= ~ASYNC_CTS_FLOW;
|
||||
else
|
||||
info->cor2 &= ~CyCtsAE;
|
||||
}
|
||||
if (cflag & CLOCAL)
|
||||
info->port.flags &= ~ASYNC_CHECK_CD;
|
||||
else
|
||||
@@ -2234,7 +2232,7 @@ static void cy_set_line_char(struct cyclades_port *info, struct tty_struct *tty)
|
||||
}
|
||||
/* As the HW flow control is done in firmware, the driver
|
||||
doesn't need to care about it */
|
||||
info->port.flags &= ~ASYNC_CTS_FLOW;
|
||||
tty_port_set_cts_flow(&info->port, 0);
|
||||
|
||||
/* XON/XOFF/XANY flow control flags */
|
||||
sw_flow = 0;
|
||||
|
Reference in New Issue
Block a user