@@ -441,7 +441,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);
@@ -133,6 +133,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 */
void tty_port_init(struct tty_port *port);
void tty_port_link_device(struct tty_port *port, struct tty_driver *driver,
@@ -226,6 +227,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);
+}
+
struct tty_struct *tty_port_tty_get(struct tty_port *port);
void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty);
int tty_port_carrier_raised(struct tty_port *port);