aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/hp/sim/simserial.c16
-rw-r--r--drivers/isdn/i4l/isdn_tty.c3
-rw-r--r--drivers/net/caif/caif_serial.c1
-rw-r--r--drivers/tty/rocket.c19
-rw-r--r--drivers/tty/serial/68328serial.c9
-rw-r--r--drivers/tty/serial/arc_uart.c2
-rw-r--r--drivers/tty/serial/crisv10.c12
7 files changed, 17 insertions, 45 deletions
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index da2f319fb71d..e70cadec7ce6 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -142,8 +142,7 @@ static void transmit_chars(struct tty_struct *tty, struct serial_state *info,
142 goto out; 142 goto out;
143 } 143 }
144 144
145 if (info->xmit.head == info->xmit.tail || tty->stopped || 145 if (info->xmit.head == info->xmit.tail || tty->stopped) {
146 tty->hw_stopped) {
147#ifdef SIMSERIAL_DEBUG 146#ifdef SIMSERIAL_DEBUG
148 printk("transmit_chars: head=%d, tail=%d, stopped=%d\n", 147 printk("transmit_chars: head=%d, tail=%d, stopped=%d\n",
149 info->xmit.head, info->xmit.tail, tty->stopped); 148 info->xmit.head, info->xmit.tail, tty->stopped);
@@ -181,7 +180,7 @@ static void rs_flush_chars(struct tty_struct *tty)
181 struct serial_state *info = tty->driver_data; 180 struct serial_state *info = tty->driver_data;
182 181
183 if (info->xmit.head == info->xmit.tail || tty->stopped || 182 if (info->xmit.head == info->xmit.tail || tty->stopped ||
184 tty->hw_stopped || !info->xmit.buf) 183 !info->xmit.buf)
185 return; 184 return;
186 185
187 transmit_chars(tty, info, NULL); 186 transmit_chars(tty, info, NULL);
@@ -217,7 +216,7 @@ static int rs_write(struct tty_struct * tty,
217 * Hey, we transmit directly from here in our case 216 * Hey, we transmit directly from here in our case
218 */ 217 */
219 if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) && 218 if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) &&
220 !tty->stopped && !tty->hw_stopped) 219 !tty->stopped)
221 transmit_chars(tty, info, NULL); 220 transmit_chars(tty, info, NULL);
222 221
223 return ret; 222 return ret;
@@ -325,14 +324,6 @@ static int rs_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
325 324
326#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) 325#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
327 326
328static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
329{
330 /* Handle turning off CRTSCTS */
331 if ((old_termios->c_cflag & CRTSCTS) &&
332 !(tty->termios.c_cflag & CRTSCTS)) {
333 tty->hw_stopped = 0;
334 }
335}
336/* 327/*
337 * This routine will shutdown a serial port; interrupts are disabled, and 328 * This routine will shutdown a serial port; interrupts are disabled, and
338 * DTR is dropped if the hangup on close termio flag is on. 329 * DTR is dropped if the hangup on close termio flag is on.
@@ -481,7 +472,6 @@ static const struct tty_operations hp_ops = {
481 .throttle = rs_throttle, 472 .throttle = rs_throttle,
482 .unthrottle = rs_unthrottle, 473 .unthrottle = rs_unthrottle,
483 .send_xchar = rs_send_xchar, 474 .send_xchar = rs_send_xchar,
484 .set_termios = rs_set_termios,
485 .hangup = rs_hangup, 475 .hangup = rs_hangup,
486 .proc_fops = &rs_proc_fops, 476 .proc_fops = &rs_proc_fops,
487}; 477};
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index d8a7d8323414..221076628585 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1470,9 +1470,6 @@ isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
1470 tty->termios.c_ospeed == old_termios->c_ospeed) 1470 tty->termios.c_ospeed == old_termios->c_ospeed)
1471 return; 1471 return;
1472 isdn_tty_change_speed(info); 1472 isdn_tty_change_speed(info);
1473 if ((old_termios->c_cflag & CRTSCTS) &&
1474 !(tty->termios.c_cflag & CRTSCTS))
1475 tty->hw_stopped = 0;
1476 } 1473 }
1477} 1474}
1478 1475
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 666891a9a248..d1bf0ff93ae0 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -88,7 +88,6 @@ static inline void update_tty_status(struct ser_device *ser)
88{ 88{
89 ser->tty_status = 89 ser->tty_status =
90 ser->tty->stopped << 5 | 90 ser->tty->stopped << 5 |
91 ser->tty->hw_stopped << 4 |
92 ser->tty->flow_stopped << 3 | 91 ser->tty->flow_stopped << 3 |
93 ser->tty->packet << 2 | 92 ser->tty->packet << 2 |
94 ser->tty->port->low_latency << 1 | 93 ser->tty->port->low_latency << 1 |
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index bbffd7a431e9..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);
@@ -1106,15 +1106,12 @@ static void rp_set_termios(struct tty_struct *tty,
1106 1106
1107 /* Handle transition away from B0 status */ 1107 /* Handle transition away from B0 status */
1108 if (!(old_termios->c_cflag & CBAUD) && (tty->termios.c_cflag & CBAUD)) { 1108 if (!(old_termios->c_cflag & CBAUD) && (tty->termios.c_cflag & CBAUD)) {
1109 if (!tty->hw_stopped || !(tty->termios.c_cflag & CRTSCTS)) 1109 sSetRTS(cp);
1110 sSetRTS(cp);
1111 sSetDTR(cp); 1110 sSetDTR(cp);
1112 } 1111 }
1113 1112
1114 if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios.c_cflag & CRTSCTS)) { 1113 if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios.c_cflag & CRTSCTS))
1115 tty->hw_stopped = 0;
1116 rp_start(tty); 1114 rp_start(tty);
1117 }
1118} 1115}
1119 1116
1120static int rp_break(struct tty_struct *tty, int break_state) 1117static int rp_break(struct tty_struct *tty, int break_state)
@@ -1570,10 +1567,10 @@ static int rp_put_char(struct tty_struct *tty, unsigned char ch)
1570 spin_lock_irqsave(&info->slock, flags); 1567 spin_lock_irqsave(&info->slock, flags);
1571 cp = &info->channel; 1568 cp = &info->channel;
1572 1569
1573 if (!tty->stopped && !tty->hw_stopped && info->xmit_fifo_room == 0) 1570 if (!tty->stopped && info->xmit_fifo_room == 0)
1574 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); 1571 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp);
1575 1572
1576 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) {
1577 info->xmit_buf[info->xmit_head++] = ch; 1574 info->xmit_buf[info->xmit_head++] = ch;
1578 info->xmit_head &= XMIT_BUF_SIZE - 1; 1575 info->xmit_head &= XMIT_BUF_SIZE - 1;
1579 info->xmit_cnt++; 1576 info->xmit_cnt++;
@@ -1614,14 +1611,14 @@ static int rp_write(struct tty_struct *tty,
1614#endif 1611#endif
1615 cp = &info->channel; 1612 cp = &info->channel;
1616 1613
1617 if (!tty->stopped && !tty->hw_stopped && info->xmit_fifo_room < count) 1614 if (!tty->stopped && info->xmit_fifo_room < count)
1618 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); 1615 info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp);
1619 1616
1620 /* 1617 /*
1621 * 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
1622 * into FIFO. Use the write queue for temp storage. 1619 * into FIFO. Use the write queue for temp storage.
1623 */ 1620 */
1624 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) {
1625 c = min(count, info->xmit_fifo_room); 1622 c = min(count, info->xmit_fifo_room);
1626 b = buf; 1623 b = buf;
1627 1624
@@ -1669,7 +1666,7 @@ static int rp_write(struct tty_struct *tty,
1669 retval += c; 1666 retval += c;
1670 } 1667 }
1671 1668
1672 if ((retval > 0) && !tty->stopped && !tty->hw_stopped) 1669 if ((retval > 0) && !tty->stopped)
1673 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]);
1674 1671
1675end: 1672end:
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 49399470794d..ef2e08e9b590 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -630,8 +630,7 @@ static void rs_flush_chars(struct tty_struct *tty)
630 /* Enable transmitter */ 630 /* Enable transmitter */
631 local_irq_save(flags); 631 local_irq_save(flags);
632 632
633 if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || 633 if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf) {
634 !info->xmit_buf) {
635 local_irq_restore(flags); 634 local_irq_restore(flags);
636 return; 635 return;
637 } 636 }
@@ -697,7 +696,7 @@ static int rs_write(struct tty_struct * tty,
697 total += c; 696 total += c;
698 } 697 }
699 698
700 if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) { 699 if (info->xmit_cnt && !tty->stopped) {
701 /* Enable transmitter */ 700 /* Enable transmitter */
702 local_irq_disable(); 701 local_irq_disable();
703#ifndef USE_INTS 702#ifndef USE_INTS
@@ -978,10 +977,8 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
978 change_speed(info, tty); 977 change_speed(info, tty);
979 978
980 if ((old_termios->c_cflag & CRTSCTS) && 979 if ((old_termios->c_cflag & CRTSCTS) &&
981 !(tty->termios.c_cflag & CRTSCTS)) { 980 !(tty->termios.c_cflag & CRTSCTS))
982 tty->hw_stopped = 0;
983 rs_start(tty); 981 rs_start(tty);
984 }
985 982
986} 983}
987 984
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index d97e194b6bc5..cbf1d155b7b2 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -162,7 +162,7 @@ static unsigned int arc_serial_tx_empty(struct uart_port *port)
162/* 162/*
163 * Driver internal routine, used by both tty(serial core) as well as tx-isr 163 * Driver internal routine, used by both tty(serial core) as well as tx-isr
164 * -Called under spinlock in either cases 164 * -Called under spinlock in either cases
165 * -also tty->stopped / tty->hw_stopped has already been checked 165 * -also tty->stopped has already been checked
166 * = by uart_start( ) before calling us 166 * = by uart_start( ) before calling us
167 * = tx_ist checks that too before calling 167 * = tx_ist checks that too before calling
168 */ 168 */
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 5f37c31e32bc..50f56f39d436 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -2534,8 +2534,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info)
2534 } 2534 }
2535 /* Normal char-by-char interrupt */ 2535 /* Normal char-by-char interrupt */
2536 if (info->xmit.head == info->xmit.tail 2536 if (info->xmit.head == info->xmit.tail
2537 || info->port.tty->stopped 2537 || info->port.tty->stopped) {
2538 || info->port.tty->hw_stopped) {
2539 DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n", 2538 DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n",
2540 info->port.tty->stopped)); 2539 info->port.tty->stopped));
2541 e100_disable_serial_tx_ready_irq(info); 2540 e100_disable_serial_tx_ready_irq(info);
@@ -3098,7 +3097,6 @@ rs_flush_chars(struct tty_struct *tty)
3098 if (info->tr_running || 3097 if (info->tr_running ||
3099 info->xmit.head == info->xmit.tail || 3098 info->xmit.head == info->xmit.tail ||
3100 tty->stopped || 3099 tty->stopped ||
3101 tty->hw_stopped ||
3102 !info->xmit.buf) 3100 !info->xmit.buf)
3103 return; 3101 return;
3104 3102
@@ -3176,7 +3174,6 @@ static int rs_raw_write(struct tty_struct *tty,
3176 3174
3177 if (info->xmit.head != info->xmit.tail && 3175 if (info->xmit.head != info->xmit.tail &&
3178 !tty->stopped && 3176 !tty->stopped &&
3179 !tty->hw_stopped &&
3180 !info->tr_running) { 3177 !info->tr_running) {
3181 start_transmit(info); 3178 start_transmit(info);
3182 } 3179 }
@@ -3733,10 +3730,8 @@ rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
3733 3730
3734 /* Handle turning off CRTSCTS */ 3731 /* Handle turning off CRTSCTS */
3735 if ((old_termios->c_cflag & CRTSCTS) && 3732 if ((old_termios->c_cflag & CRTSCTS) &&
3736 !(tty->termios.c_cflag & CRTSCTS)) { 3733 !(tty->termios.c_cflag & CRTSCTS))
3737 tty->hw_stopped = 0;
3738 rs_start(tty); 3734 rs_start(tty);
3739 }
3740 3735
3741} 3736}
3742 3737
@@ -4256,9 +4251,6 @@ static void seq_line_info(struct seq_file *m, struct e100_serial *info)
4256 if (info->port.tty->stopped) 4251 if (info->port.tty->stopped)
4257 seq_printf(m, " stopped:%i", 4252 seq_printf(m, " stopped:%i",
4258 (int)info->port.tty->stopped); 4253 (int)info->port.tty->stopped);
4259 if (info->port.tty->hw_stopped)
4260 seq_printf(m, " hw_stopped:%i",
4261 (int)info->port.tty->hw_stopped);
4262 } 4254 }
4263 4255
4264 { 4256 {