|
@@ -137,7 +137,7 @@ int tty_port_carrier_raised(struct tty_port *port)
|
|
EXPORT_SYMBOL(tty_port_carrier_raised);
|
|
EXPORT_SYMBOL(tty_port_carrier_raised);
|
|
|
|
|
|
/**
|
|
/**
|
|
- * tty_port_raise_dtr_rts - Riase DTR/RTS
|
|
|
|
|
|
+ * tty_port_raise_dtr_rts - Raise DTR/RTS
|
|
* @port: tty port
|
|
* @port: tty port
|
|
*
|
|
*
|
|
* Wrapper for the DTR/RTS raise logic. For the moment this is used
|
|
* Wrapper for the DTR/RTS raise logic. For the moment this is used
|
|
@@ -147,11 +147,27 @@ EXPORT_SYMBOL(tty_port_carrier_raised);
|
|
|
|
|
|
void tty_port_raise_dtr_rts(struct tty_port *port)
|
|
void tty_port_raise_dtr_rts(struct tty_port *port)
|
|
{
|
|
{
|
|
- if (port->ops->raise_dtr_rts)
|
|
|
|
- port->ops->raise_dtr_rts(port);
|
|
|
|
|
|
+ if (port->ops->dtr_rts)
|
|
|
|
+ port->ops->dtr_rts(port, 1);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(tty_port_raise_dtr_rts);
|
|
EXPORT_SYMBOL(tty_port_raise_dtr_rts);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * tty_port_lower_dtr_rts - Lower DTR/RTS
|
|
|
|
+ * @port: tty port
|
|
|
|
+ *
|
|
|
|
+ * Wrapper for the DTR/RTS raise logic. For the moment this is used
|
|
|
|
+ * to hide some internal details. This will eventually become entirely
|
|
|
|
+ * internal to the tty port.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+void tty_port_lower_dtr_rts(struct tty_port *port)
|
|
|
|
+{
|
|
|
|
+ if (port->ops->dtr_rts)
|
|
|
|
+ port->ops->dtr_rts(port, 0);
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(tty_port_lower_dtr_rts);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* tty_port_block_til_ready - Waiting logic for tty open
|
|
* tty_port_block_til_ready - Waiting logic for tty open
|
|
* @port: the tty port being opened
|
|
* @port: the tty port being opened
|
|
@@ -167,7 +183,7 @@ EXPORT_SYMBOL(tty_port_raise_dtr_rts);
|
|
* - port flags and counts
|
|
* - port flags and counts
|
|
*
|
|
*
|
|
* The passed tty_port must implement the carrier_raised method if it can
|
|
* The passed tty_port must implement the carrier_raised method if it can
|
|
- * do carrier detect and the raise_dtr_rts method if it supports software
|
|
|
|
|
|
+ * do carrier detect and the dtr_rts method if it supports software
|
|
* management of these lines. Note that the dtr/rts raise is done each
|
|
* management of these lines. Note that the dtr/rts raise is done each
|
|
* iteration as a hangup may have previously dropped them while we wait.
|
|
* iteration as a hangup may have previously dropped them while we wait.
|
|
*/
|
|
*/
|
|
@@ -302,6 +318,9 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
|
|
|
|
|
|
tty_ldisc_flush(tty);
|
|
tty_ldisc_flush(tty);
|
|
|
|
|
|
|
|
+ if (tty->termios->c_cflag & HUPCL)
|
|
|
|
+ tty_port_lower_dtr_rts(port);
|
|
|
|
+
|
|
spin_lock_irqsave(&port->lock, flags);
|
|
spin_lock_irqsave(&port->lock, flags);
|
|
tty->closing = 0;
|
|
tty->closing = 0;
|
|
|
|
|