diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-04-09 20:11:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 12:26:55 -0400 |
commit | 97ef38b8210d7459d4cb51668cdf3983772ac6b7 (patch) | |
tree | f011edb839f562892be0d70dc021ad08cec6745e | |
parent | 18900ca65a8553edc608b6c9d518eb31e6c09ba1 (diff) |
tty: Replace TTY_THROTTLED bit tests with tty_throttled()
Abstract TTY_THROTTLED bit tests with tty_throttled().
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 2 | ||||
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 2 | ||||
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 2 | ||||
-rw-r--r-- | drivers/staging/speakup/selection.c | 2 | ||||
-rw-r--r-- | drivers/tty/amiserial.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_console.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvsi.c | 2 | ||||
-rw-r--r-- | drivers/tty/moxa.c | 2 | ||||
-rw-r--r-- | drivers/tty/nozomi.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/serial_core.c | 2 | ||||
-rw-r--r-- | drivers/tty/synclink.c | 2 | ||||
-rw-r--r-- | drivers/tty/synclink_gt.c | 2 | ||||
-rw-r--r-- | drivers/tty/synclinkmp.c | 2 | ||||
-rw-r--r-- | drivers/tty/tty_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/tty/vt/selection.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/function/u_serial.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 3 | ||||
-rw-r--r-- | include/linux/tty.h | 5 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty_ioctl.c | 2 |
21 files changed, 27 insertions, 23 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 825db423b7a8..bcae5bb15751 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -2316,7 +2316,7 @@ static void mgslpc_set_termios(struct tty_struct *tty, struct ktermios *old_term | |||
2316 | /* Handle transition away from B0 status */ | 2316 | /* Handle transition away from B0 status */ |
2317 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { | 2317 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { |
2318 | info->serial_signals |= SerialSignal_DTR; | 2318 | info->serial_signals |= SerialSignal_DTR; |
2319 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 2319 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
2320 | info->serial_signals |= SerialSignal_RTS; | 2320 | info->serial_signals |= SerialSignal_RTS; |
2321 | spin_lock_irqsave(&info->lock, flags); | 2321 | spin_lock_irqsave(&info->lock, flags); |
2322 | set_signals(info); | 2322 | set_signals(info); |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 5415056f9aa5..5af6fb9a9ce2 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -895,7 +895,7 @@ static void sdio_uart_set_termios(struct tty_struct *tty, | |||
895 | /* Handle transition away from B0 status */ | 895 | /* Handle transition away from B0 status */ |
896 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { | 896 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { |
897 | unsigned int mask = TIOCM_DTR; | 897 | unsigned int mask = TIOCM_DTR; |
898 | if (!(cflag & CRTSCTS) || !test_bit(TTY_THROTTLED, &tty->flags)) | 898 | if (!(cflag & CRTSCTS) || !tty_throttled(tty)) |
899 | mask |= TIOCM_RTS; | 899 | mask |= TIOCM_RTS; |
900 | sdio_uart_set_mctrl(port, mask); | 900 | sdio_uart_set_mctrl(port, mask); |
901 | } | 901 | } |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 111d907e0c11..4b4458616693 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2029,7 +2029,7 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial) | |||
2029 | 2029 | ||
2030 | tty = tty_port_tty_get(&serial->port); | 2030 | tty = tty_port_tty_get(&serial->port); |
2031 | 2031 | ||
2032 | if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { | 2032 | if (tty && tty_throttled(tty)) { |
2033 | tty_kref_put(tty); | 2033 | tty_kref_put(tty); |
2034 | return -1; | 2034 | return -1; |
2035 | } | 2035 | } |
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 9b23b5c95f5e..1f9389d8c152 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c | |||
@@ -1305,7 +1305,7 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
1305 | if ((baud == 0) && (old->c_cflag & CBAUD)) { | 1305 | if ((baud == 0) && (old->c_cflag & CBAUD)) { |
1306 | port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS); | 1306 | port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS); |
1307 | } else if ((baud != 0) && !(old->c_cflag & CBAUD)) { | 1307 | } else if ((baud != 0) && !(old->c_cflag & CBAUD)) { |
1308 | if (C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 1308 | if (C_CRTSCTS(tty) || !tty_throttled(tty)) |
1309 | port->mctrl |= TIOCM_DTR | TIOCM_RTS; | 1309 | port->mctrl |= TIOCM_DTR | TIOCM_RTS; |
1310 | else | 1310 | else |
1311 | port->mctrl |= TIOCM_DTR; | 1311 | port->mctrl |= TIOCM_DTR; |
diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index 41ef099b7aa6..0149edc1e0ae 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c | |||
@@ -150,7 +150,7 @@ static void __speakup_paste_selection(struct work_struct *work) | |||
150 | add_wait_queue(&vc->paste_wait, &wait); | 150 | add_wait_queue(&vc->paste_wait, &wait); |
151 | while (sel_buffer && sel_buffer_lth > pasted) { | 151 | while (sel_buffer && sel_buffer_lth > pasted) { |
152 | set_current_state(TASK_INTERRUPTIBLE); | 152 | set_current_state(TASK_INTERRUPTIBLE); |
153 | if (test_bit(TTY_THROTTLED, &tty->flags)) { | 153 | if (tty_throttled(tty)) { |
154 | schedule(); | 154 | schedule(); |
155 | continue; | 155 | continue; |
156 | } | 156 | } |
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 183e98e84d09..e68208eac322 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -1342,7 +1342,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
1342 | /* Handle transition away from B0 status */ | 1342 | /* Handle transition away from B0 status */ |
1343 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { | 1343 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { |
1344 | info->MCR |= SER_DTR; | 1344 | info->MCR |= SER_DTR; |
1345 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 1345 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
1346 | info->MCR |= SER_RTS; | 1346 | info->MCR |= SER_RTS; |
1347 | local_irq_save(flags); | 1347 | local_irq_save(flags); |
1348 | rtsdtr_ctrl(info->MCR); | 1348 | rtsdtr_ctrl(info->MCR); |
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index e46d628998f5..209dad8c96a0 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c | |||
@@ -632,7 +632,7 @@ int hvc_poll(struct hvc_struct *hp) | |||
632 | goto bail; | 632 | goto bail; |
633 | 633 | ||
634 | /* Now check if we can get data (are we throttled ?) */ | 634 | /* Now check if we can get data (are we throttled ?) */ |
635 | if (test_bit(TTY_THROTTLED, &tty->flags)) | 635 | if (tty_throttled(tty)) |
636 | goto throttled; | 636 | goto throttled; |
637 | 637 | ||
638 | /* If we aren't notifier driven and aren't throttled, we always | 638 | /* If we aren't notifier driven and aren't throttled, we always |
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 5997b1731111..3c4d7c2b4ade 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -600,7 +600,7 @@ static int hvcs_io(struct hvcs_struct *hvcsd) | |||
600 | 600 | ||
601 | hvcs_try_write(hvcsd); | 601 | hvcs_try_write(hvcsd); |
602 | 602 | ||
603 | if (!tty || test_bit(TTY_THROTTLED, &tty->flags)) { | 603 | if (!tty || tty_throttled(tty)) { |
604 | hvcsd->todo_mask &= ~(HVCS_READ_MASK); | 604 | hvcsd->todo_mask &= ~(HVCS_READ_MASK); |
605 | goto bail; | 605 | goto bail; |
606 | } else if (!(hvcsd->todo_mask & (HVCS_READ_MASK))) | 606 | } else if (!(hvcsd->todo_mask & (HVCS_READ_MASK))) |
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index a75146f600cb..96ce6bd1cc6f 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c | |||
@@ -509,7 +509,7 @@ static irqreturn_t hvsi_interrupt(int irq, void *arg) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | spin_lock_irqsave(&hp->lock, flags); | 511 | spin_lock_irqsave(&hp->lock, flags); |
512 | if (tty && hp->n_throttle && !test_bit(TTY_THROTTLED, &tty->flags)) { | 512 | if (tty && hp->n_throttle && !tty_throttled(tty)) { |
513 | /* we weren't hung up and we weren't throttled, so we can | 513 | /* we weren't hung up and we weren't throttled, so we can |
514 | * deliver the rest now */ | 514 | * deliver the rest now */ |
515 | hvsi_send_overflow(hp); | 515 | hvsi_send_overflow(hp); |
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 92982d7c0489..ce521d3f58cb 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c | |||
@@ -1394,7 +1394,7 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle, | |||
1394 | tty_wakeup(tty); | 1394 | tty_wakeup(tty); |
1395 | } | 1395 | } |
1396 | 1396 | ||
1397 | if (inited && !test_bit(TTY_THROTTLED, &tty->flags) && | 1397 | if (inited && !tty_throttled(tty) && |
1398 | MoxaPortRxQueue(p) > 0) { /* RX */ | 1398 | MoxaPortRxQueue(p) > 0) { /* RX */ |
1399 | MoxaPortReadData(p); | 1399 | MoxaPortReadData(p); |
1400 | tty_schedule_flip(&p->port); | 1400 | tty_schedule_flip(&p->port); |
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index 5cc80b80c82b..d6fd0e802ef5 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c | |||
@@ -826,7 +826,7 @@ static int receive_data(enum port_type index, struct nozomi *dc) | |||
826 | size = __le32_to_cpu(readl(addr)); | 826 | size = __le32_to_cpu(readl(addr)); |
827 | /* DBG1( "%d bytes port: %d", size, index); */ | 827 | /* DBG1( "%d bytes port: %d", size, index); */ |
828 | 828 | ||
829 | if (tty && test_bit(TTY_THROTTLED, &tty->flags)) { | 829 | if (tty && tty_throttled(tty)) { |
830 | DBG1("No room in tty, don't read data, don't ack interrupt, " | 830 | DBG1("No room in tty, don't read data, don't ack interrupt, " |
831 | "disable interrupt"); | 831 | "disable interrupt"); |
832 | 832 | ||
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 67b395031347..64a5c00d7468 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -1350,7 +1350,7 @@ static void uart_set_termios(struct tty_struct *tty, | |||
1350 | /* Handle transition away from B0 status */ | 1350 | /* Handle transition away from B0 status */ |
1351 | else if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { | 1351 | else if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { |
1352 | unsigned int mask = TIOCM_DTR; | 1352 | unsigned int mask = TIOCM_DTR; |
1353 | if (!(cflag & CRTSCTS) || !test_bit(TTY_THROTTLED, &tty->flags)) | 1353 | if (!(cflag & CRTSCTS) || !tty_throttled(tty)) |
1354 | mask |= TIOCM_RTS; | 1354 | mask |= TIOCM_RTS; |
1355 | uart_set_mctrl(uport, mask); | 1355 | uart_set_mctrl(uport, mask); |
1356 | } | 1356 | } |
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index 8b2277223ee7..3768e5c71c0b 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c | |||
@@ -3049,7 +3049,7 @@ static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termio | |||
3049 | /* Handle transition away from B0 status */ | 3049 | /* Handle transition away from B0 status */ |
3050 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { | 3050 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { |
3051 | info->serial_signals |= SerialSignal_DTR; | 3051 | info->serial_signals |= SerialSignal_DTR; |
3052 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 3052 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
3053 | info->serial_signals |= SerialSignal_RTS; | 3053 | info->serial_signals |= SerialSignal_RTS; |
3054 | spin_lock_irqsave(&info->irq_spinlock,flags); | 3054 | spin_lock_irqsave(&info->irq_spinlock,flags); |
3055 | usc_set_serial_signals(info); | 3055 | usc_set_serial_signals(info); |
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 1f7d6d9437e6..ceeaeb703f51 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
@@ -784,7 +784,7 @@ static void set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
784 | /* Handle transition away from B0 status */ | 784 | /* Handle transition away from B0 status */ |
785 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { | 785 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { |
786 | info->signals |= SerialSignal_DTR; | 786 | info->signals |= SerialSignal_DTR; |
787 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 787 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
788 | info->signals |= SerialSignal_RTS; | 788 | info->signals |= SerialSignal_RTS; |
789 | spin_lock_irqsave(&info->lock,flags); | 789 | spin_lock_irqsave(&info->lock,flags); |
790 | set_signals(info); | 790 | set_signals(info); |
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index e93879944905..b0cce4b24e51 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c | |||
@@ -881,7 +881,7 @@ static void set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
881 | /* Handle transition away from B0 status */ | 881 | /* Handle transition away from B0 status */ |
882 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { | 882 | if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) { |
883 | info->serial_signals |= SerialSignal_DTR; | 883 | info->serial_signals |= SerialSignal_DTR; |
884 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 884 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
885 | info->serial_signals |= SerialSignal_RTS; | 885 | info->serial_signals |= SerialSignal_RTS; |
886 | spin_lock_irqsave(&info->lock,flags); | 886 | spin_lock_irqsave(&info->lock,flags); |
887 | set_signals(info); | 887 | set_signals(info); |
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index 23bf5bb1d8bf..bf36ac9aee41 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c | |||
@@ -158,7 +158,7 @@ int tty_throttle_safe(struct tty_struct *tty) | |||
158 | int ret = 0; | 158 | int ret = 0; |
159 | 159 | ||
160 | mutex_lock(&tty->throttle_mutex); | 160 | mutex_lock(&tty->throttle_mutex); |
161 | if (!test_bit(TTY_THROTTLED, &tty->flags)) { | 161 | if (!tty_throttled(tty)) { |
162 | if (tty->flow_change != TTY_THROTTLE_SAFE) | 162 | if (tty->flow_change != TTY_THROTTLE_SAFE) |
163 | ret = 1; | 163 | ret = 1; |
164 | else { | 164 | else { |
@@ -189,7 +189,7 @@ int tty_unthrottle_safe(struct tty_struct *tty) | |||
189 | int ret = 0; | 189 | int ret = 0; |
190 | 190 | ||
191 | mutex_lock(&tty->throttle_mutex); | 191 | mutex_lock(&tty->throttle_mutex); |
192 | if (test_bit(TTY_THROTTLED, &tty->flags)) { | 192 | if (tty_throttled(tty)) { |
193 | if (tty->flow_change != TTY_UNTHROTTLE_SAFE) | 193 | if (tty->flow_change != TTY_UNTHROTTLE_SAFE) |
194 | ret = 1; | 194 | ret = 1; |
195 | else { | 195 | else { |
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index 4dd9dd2270a0..368ce1803e8f 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c | |||
@@ -354,7 +354,7 @@ int paste_selection(struct tty_struct *tty) | |||
354 | add_wait_queue(&vc->paste_wait, &wait); | 354 | add_wait_queue(&vc->paste_wait, &wait); |
355 | while (sel_buffer && sel_buffer_lth > pasted) { | 355 | while (sel_buffer && sel_buffer_lth > pasted) { |
356 | set_current_state(TASK_INTERRUPTIBLE); | 356 | set_current_state(TASK_INTERRUPTIBLE); |
357 | if (test_bit(TTY_THROTTLED, &tty->flags)) { | 357 | if (tty_throttled(tty)) { |
358 | schedule(); | 358 | schedule(); |
359 | continue; | 359 | continue; |
360 | } | 360 | } |
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 6af145f2a99d..3580f198df8b 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c | |||
@@ -512,7 +512,7 @@ static void gs_rx_push(unsigned long _port) | |||
512 | req = list_first_entry(queue, struct usb_request, list); | 512 | req = list_first_entry(queue, struct usb_request, list); |
513 | 513 | ||
514 | /* leave data queued if tty was rx throttled */ | 514 | /* leave data queued if tty was rx throttled */ |
515 | if (tty && test_bit(TTY_THROTTLED, &tty->flags)) | 515 | if (tty && tty_throttled(tty)) |
516 | break; | 516 | break; |
517 | 517 | ||
518 | switch (req->status) { | 518 | switch (req->status) { |
@@ -579,7 +579,7 @@ static void gs_rx_push(unsigned long _port) | |||
579 | * from starving ... but it's not clear that case ever happens. | 579 | * from starving ... but it's not clear that case ever happens. |
580 | */ | 580 | */ |
581 | if (!list_empty(queue) && tty) { | 581 | if (!list_empty(queue) && tty) { |
582 | if (!test_bit(TTY_THROTTLED, &tty->flags)) { | 582 | if (!tty_throttled(tty)) { |
583 | if (do_push) | 583 | if (do_push) |
584 | tasklet_schedule(&port->push); | 584 | tasklet_schedule(&port->push); |
585 | else | 585 | else |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 16e8e37b3b36..6a1df9e824ca 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -699,8 +699,7 @@ static void digi_set_termios(struct tty_struct *tty, | |||
699 | /* don't set RTS if using hardware flow control */ | 699 | /* don't set RTS if using hardware flow control */ |
700 | /* and throttling input */ | 700 | /* and throttling input */ |
701 | modem_signals = TIOCM_DTR; | 701 | modem_signals = TIOCM_DTR; |
702 | if (!C_CRTSCTS(tty) || | 702 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
703 | !test_bit(TTY_THROTTLED, &tty->flags)) | ||
704 | modem_signals |= TIOCM_RTS; | 703 | modem_signals |= TIOCM_RTS; |
705 | digi_set_modem_signals(port, modem_signals, 1); | 704 | digi_set_modem_signals(port, modem_signals, 1); |
706 | } | 705 | } |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 68d829bf93b8..89f9c91b40f5 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -365,6 +365,11 @@ static inline bool tty_io_error(struct tty_struct *tty) | |||
365 | return test_bit(TTY_IO_ERROR, &tty->flags); | 365 | return test_bit(TTY_IO_ERROR, &tty->flags); |
366 | } | 366 | } |
367 | 367 | ||
368 | static inline bool tty_throttled(struct tty_struct *tty) | ||
369 | { | ||
370 | return test_bit(TTY_THROTTLED, &tty->flags); | ||
371 | } | ||
372 | |||
368 | #ifdef CONFIG_TTY | 373 | #ifdef CONFIG_TTY |
369 | extern void console_init(void); | 374 | extern void console_init(void); |
370 | extern void tty_kref_put(struct tty_struct *tty); | 375 | extern void tty_kref_put(struct tty_struct *tty); |
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c index 9beb011441fa..8d8fd28ff4d9 100644 --- a/net/irda/ircomm/ircomm_tty_ioctl.c +++ b/net/irda/ircomm/ircomm_tty_ioctl.c | |||
@@ -166,7 +166,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
166 | /* Handle transition away from B0 status */ | 166 | /* Handle transition away from B0 status */ |
167 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { | 167 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { |
168 | self->settings.dte |= IRCOMM_DTR; | 168 | self->settings.dte |= IRCOMM_DTR; |
169 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) | 169 | if (!C_CRTSCTS(tty) || !tty_throttled(tty)) |
170 | self->settings.dte |= IRCOMM_RTS; | 170 | self->settings.dte |= IRCOMM_RTS; |
171 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 171 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
172 | } | 172 | } |