aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/rocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r--drivers/tty/rocket.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index 1d270034bfc3..f5abc2888821 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -449,7 +449,7 @@ static void rp_do_transmit(struct r_port *info)
449 449
450 /* Loop sending data to FIFO until done or FIFO full */ 450 /* Loop sending data to FIFO until done or FIFO full */
451 while (1) { 451 while (1) {
452 if (tty->stopped || tty->hw_stopped) 452 if (tty->stopped)
453 break; 453 break;
454 c = min(info->xmit_fifo_room, info->xmit_cnt); 454 c = min(info->xmit_fifo_room, info->xmit_cnt);
455 c = min(c, XMIT_BUF_SIZE - info->xmit_tail); 455 c = min(c, XMIT_BUF_SIZE - info->xmit_tail);
@@ -521,15 +521,10 @@ static void rp_handle_port(struct r_port *info)
521 (ChanStatus & CD_ACT) ? "on" : "off"); 521 (ChanStatus & CD_ACT) ? "on" : "off");
522#endif 522#endif
523 if (!(ChanStatus & CD_ACT) && info->cd_status) { 523 if (!(ChanStatus & CD_ACT) && info->cd_status) {
524 struct tty_struct *tty;
525#ifdef ROCKET_DEBUG_HANGUP 524#ifdef ROCKET_DEBUG_HANGUP
526 printk(KERN_INFO "CD drop, calling hangup.\n"); 525 printk(KERN_INFO "CD drop, calling hangup.\n");
527#endif 526#endif
528 tty = tty_port_tty_get(&info->port); 527 tty_port_tty_hangup(&info->port, false);
529 if (tty) {
530 tty_hangup(tty);
531 tty_kref_put(tty);
532 }
533 } 528 }
534 info->cd_status = (ChanStatus & CD_ACT) ? 1 : 0; 529 info->cd_status = (ChanStatus & CD_ACT) ? 1 : 0;
535 wake_up_interruptible(&info->port.open_wait); 530 wake_up_interruptible(&info->port.open_wait);
@@ -1111,15 +1106,12 @@ static void rp_set_termios(struct tty_struct *tty,
1111 1106
1112 /* Handle transition away from B0 status */ 1107 /* Handle transition away from B0 status */
1113 if (!(old_termios->c_cflag & CBAUD) && (tty->termios.c_cflag & CBAUD)) { 1108 if (!(old_termios->c_cflag & CBAUD) && (tty->termios.c_cflag & CBAUD)) {
1114 if (!tty->hw_stopped || !(tty->termios.c_cflag & CRTSCTS)) 1109 sSetRTS(cp);
1115 sSetRTS(cp);
1116 sSetDTR(cp); 1110 sSetDTR(cp);
1117 } 1111 }
1118 1112
1119 if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios.c_cflag & CRTSCTS)) { 1113 if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios.c_cflag & CRTSCTS))
1120 tty->hw_stopped = 0;
1121 rp_start(tty); 1114 rp_start(tty);
1122 }
1123} 1115}
1124 1116
1125static int rp_break(struct tty_struct *tty, int break_state) 1117static int rp_break(struct tty_struct *tty, int break_state)
@@ -1575,10 +1567,10 @@ static int rp_put_char(struct tty_struct *tty, unsigned char ch)
1575 spin_lock_irqsave(&info->slock, flags); 1567 spin_lock_irqsave(&info->slock, flags);
1576 cp = &info->channel; 1568 cp = &info->channel;
1577 1569
1578 if (!tty->stopped && !tty->hw_stopped && info->xmit_fifo_room == 0) 1570 if (!tty->stopped && info->xmit_fifo_room == 0)
1579 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); 1571 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp);
1580 1572
1581 if (tty->stopped || tty->hw_stopped || info->xmit_fifo_room == 0 || info->xmit_cnt != 0) { 1573 if (tty->stopped || info->xmit_fifo_room == 0 || info->xmit_cnt != 0) {
1582 info->xmit_buf[info->xmit_head++] = ch; 1574 info->xmit_buf[info->xmit_head++] = ch;
1583 info->xmit_head &= XMIT_BUF_SIZE - 1; 1575 info->xmit_head &= XMIT_BUF_SIZE - 1;
1584 info->xmit_cnt++; 1576 info->xmit_cnt++;
@@ -1619,14 +1611,14 @@ static int rp_write(struct tty_struct *tty,
1619#endif 1611#endif
1620 cp = &info->channel; 1612 cp = &info->channel;
1621 1613
1622 if (!tty->stopped && !tty->hw_stopped && info->xmit_fifo_room < count) 1614 if (!tty->stopped && info->xmit_fifo_room < count)
1623 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); 1615 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp);
1624 1616
1625 /* 1617 /*
1626 * If the write queue for the port is empty, and there is FIFO space, stuff bytes 1618 * If the write queue for the port is empty, and there is FIFO space, stuff bytes
1627 * into FIFO. Use the write queue for temp storage. 1619 * into FIFO. Use the write queue for temp storage.
1628 */ 1620 */
1629 if (!tty->stopped && !tty->hw_stopped && info->xmit_cnt == 0 && info->xmit_fifo_room > 0) { 1621 if (!tty->stopped && info->xmit_cnt == 0 && info->xmit_fifo_room > 0) {
1630 c = min(count, info->xmit_fifo_room); 1622 c = min(count, info->xmit_fifo_room);
1631 b = buf; 1623 b = buf;
1632 1624
@@ -1674,7 +1666,7 @@ static int rp_write(struct tty_struct *tty,
1674 retval += c; 1666 retval += c;
1675 } 1667 }
1676 1668
1677 if ((retval > 0) && !tty->stopped && !tty->hw_stopped) 1669 if ((retval > 0) && !tty->stopped)
1678 set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]); 1670 set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
1679 1671
1680end: 1672end: