@@ -415,7 +415,7 @@ EXPORT_SYMBOL(tty_port_carrier_raised);
*/
void tty_port_raise_dtr_rts(struct tty_port *port)
{
- if (port->ops->dtr_rts)
+ if (port->ops->dtr_rts && !tty_port_nordy(port))
port->ops->dtr_rts(port, 1);
}
EXPORT_SYMBOL(tty_port_raise_dtr_rts);
@@ -267,6 +267,7 @@ struct tty_port {
#define TTY_PORT_CHECK_CD 4 /* carrier detect enabled */
#define TTY_PORT_KOPENED 5 /* device exclusively opened by
kernel */
+#define TTY_PORT_NORDY 6 /* do not raise DTR/RTS on open */
/*
* Where all of the state associated with a tty is kept while the tty
@@ -665,6 +666,16 @@ static inline void tty_port_set_kopened(struct tty_port *port, bool val)
assign_bit(TTY_PORT_KOPENED, &port->iflags, val);
}
+static inline bool tty_port_nordy(const struct tty_port *port)
+{
+ return test_bit(TTY_PORT_NORDY, &port->iflags);
+}
+
+static inline void tty_port_set_nordy(struct tty_port *port, bool val)
+{
+ assign_bit(TTY_PORT_NORDY, &port->iflags, val);
+}
+
extern struct tty_struct *tty_port_tty_get(struct tty_port *port);
extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty);
extern int tty_port_carrier_raised(struct tty_port *port);