aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-09 22:51:07 -0400
committerPaul Mundt <lethal@linux-sh.org>2012-05-09 22:51:07 -0400
commit15f99cbd071aa402e113d342448603344a337046 (patch)
tree56f98892d1bd38029988eb8931e2321ef7e79aa0 /drivers/tty
parentb2212ea41dacda8cce0e7681a3a6ccc76c63802e (diff)
parent41797f75486d8ca3b98d7658c2a506ac7879a8e5 (diff)
Merge branch 'sh/rsk-updates' into sh-latest
Conflicts: arch/sh/Kconfig Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/amiserial.c4
-rw-r--r--drivers/tty/serial/clps711x.c14
-rw-r--r--drivers/tty/serial/pch_uart.c4
-rw-r--r--drivers/tty/serial/pmac_zilog.c6
-rw-r--r--drivers/tty/vt/keyboard.c26
5 files changed, 36 insertions, 18 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 24145c30c9b0..6cc4358f68c1 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1073,8 +1073,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
1073 (new_serial.close_delay != port->close_delay) || 1073 (new_serial.close_delay != port->close_delay) ||
1074 (new_serial.xmit_fifo_size != state->xmit_fifo_size) || 1074 (new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
1075 ((new_serial.flags & ~ASYNC_USR_MASK) != 1075 ((new_serial.flags & ~ASYNC_USR_MASK) !=
1076 (port->flags & ~ASYNC_USR_MASK))) 1076 (port->flags & ~ASYNC_USR_MASK))) {
1077 tty_unlock();
1077 return -EPERM; 1078 return -EPERM;
1079 }
1078 port->flags = ((port->flags & ~ASYNC_USR_MASK) | 1080 port->flags = ((port->flags & ~ASYNC_USR_MASK) |
1079 (new_serial.flags & ASYNC_USR_MASK)); 1081 (new_serial.flags & ASYNC_USR_MASK));
1080 state->custom_divisor = new_serial.custom_divisor; 1082 state->custom_divisor = new_serial.custom_divisor;
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index e6c3dbd781d6..836fe2731234 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
154 port->x_char = 0; 154 port->x_char = 0;
155 return IRQ_HANDLED; 155 return IRQ_HANDLED;
156 } 156 }
157 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 157
158 clps711xuart_stop_tx(port); 158 if (uart_circ_empty(xmit) || uart_tx_stopped(port))
159 return IRQ_HANDLED; 159 goto disable_tx_irq;
160 }
161 160
162 count = port->fifosize >> 1; 161 count = port->fifosize >> 1;
163 do { 162 do {
@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
171 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 170 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
172 uart_write_wakeup(port); 171 uart_write_wakeup(port);
173 172
174 if (uart_circ_empty(xmit)) 173 if (uart_circ_empty(xmit)) {
175 clps711xuart_stop_tx(port); 174 disable_tx_irq:
175 disable_irq_nosync(TX_IRQ(port));
176 tx_enabled(port) = 0;
177 }
176 178
177 return IRQ_HANDLED; 179 return IRQ_HANDLED;
178} 180}
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index bbbec4a74cfb..c2816f494807 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1447,9 +1447,11 @@ static int pch_uart_verify_port(struct uart_port *port,
1447 __func__); 1447 __func__);
1448 return -EOPNOTSUPP; 1448 return -EOPNOTSUPP;
1449#endif 1449#endif
1450 priv->use_dma = 1;
1451 priv->use_dma_flag = 1; 1450 priv->use_dma_flag = 1;
1452 dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n"); 1451 dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
1452 if (!priv->use_dma)
1453 pch_request_dma(port);
1454 priv->use_dma = 1;
1453 } 1455 }
1454 1456
1455 return 0; 1457 return 0;
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 08ebe901bb59..654755a990df 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -469,7 +469,7 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id)
469 tty = NULL; 469 tty = NULL;
470 if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { 470 if (r3 & (CHAEXT | CHATxIP | CHARxIP)) {
471 if (!ZS_IS_OPEN(uap_a)) { 471 if (!ZS_IS_OPEN(uap_a)) {
472 pmz_debug("ChanA interrupt while open !\n"); 472 pmz_debug("ChanA interrupt while not open !\n");
473 goto skip_a; 473 goto skip_a;
474 } 474 }
475 write_zsreg(uap_a, R0, RES_H_IUS); 475 write_zsreg(uap_a, R0, RES_H_IUS);
@@ -493,8 +493,8 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id)
493 spin_lock(&uap_b->port.lock); 493 spin_lock(&uap_b->port.lock);
494 tty = NULL; 494 tty = NULL;
495 if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { 495 if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) {
496 if (!ZS_IS_OPEN(uap_a)) { 496 if (!ZS_IS_OPEN(uap_b)) {
497 pmz_debug("ChanB interrupt while open !\n"); 497 pmz_debug("ChanB interrupt while not open !\n");
498 goto skip_b; 498 goto skip_b;
499 } 499 }
500 write_zsreg(uap_b, R0, RES_H_IUS); 500 write_zsreg(uap_b, R0, RES_H_IUS);
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 86dd1e302bb3..29ca20dbd335 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1085,15 +1085,21 @@ void vt_set_led_state(int console, int leds)
1085 * 1085 *
1086 * Handle console start. This is a wrapper for the VT layer 1086 * Handle console start. This is a wrapper for the VT layer
1087 * so that we can keep kbd knowledge internal 1087 * so that we can keep kbd knowledge internal
1088 *
1089 * FIXME: We eventually need to hold the kbd lock here to protect
1090 * the LED updating. We can't do it yet because fn_hold calls stop_tty
1091 * and start_tty under the kbd_event_lock, while normal tty paths
1092 * don't hold the lock. We probably need to split out an LED lock
1093 * but not during an -rc release!
1088 */ 1094 */
1089void vt_kbd_con_start(int console) 1095void vt_kbd_con_start(int console)
1090{ 1096{
1091 struct kbd_struct * kbd = kbd_table + console; 1097 struct kbd_struct * kbd = kbd_table + console;
1092 unsigned long flags; 1098/* unsigned long flags; */
1093 spin_lock_irqsave(&kbd_event_lock, flags); 1099/* spin_lock_irqsave(&kbd_event_lock, flags); */
1094 clr_vc_kbd_led(kbd, VC_SCROLLOCK); 1100 clr_vc_kbd_led(kbd, VC_SCROLLOCK);
1095 set_leds(); 1101 set_leds();
1096 spin_unlock_irqrestore(&kbd_event_lock, flags); 1102/* spin_unlock_irqrestore(&kbd_event_lock, flags); */
1097} 1103}
1098 1104
1099/** 1105/**
@@ -1102,22 +1108,28 @@ void vt_kbd_con_start(int console)
1102 * 1108 *
1103 * Handle console stop. This is a wrapper for the VT layer 1109 * Handle console stop. This is a wrapper for the VT layer
1104 * so that we can keep kbd knowledge internal 1110 * so that we can keep kbd knowledge internal
1111 *
1112 * FIXME: We eventually need to hold the kbd lock here to protect
1113 * the LED updating. We can't do it yet because fn_hold calls stop_tty
1114 * and start_tty under the kbd_event_lock, while normal tty paths
1115 * don't hold the lock. We probably need to split out an LED lock
1116 * but not during an -rc release!
1105 */ 1117 */
1106void vt_kbd_con_stop(int console) 1118void vt_kbd_con_stop(int console)
1107{ 1119{
1108 struct kbd_struct * kbd = kbd_table + console; 1120 struct kbd_struct * kbd = kbd_table + console;
1109 unsigned long flags; 1121/* unsigned long flags; */
1110 spin_lock_irqsave(&kbd_event_lock, flags); 1122/* spin_lock_irqsave(&kbd_event_lock, flags); */
1111 set_vc_kbd_led(kbd, VC_SCROLLOCK); 1123 set_vc_kbd_led(kbd, VC_SCROLLOCK);
1112 set_leds(); 1124 set_leds();
1113 spin_unlock_irqrestore(&kbd_event_lock, flags); 1125/* spin_unlock_irqrestore(&kbd_event_lock, flags); */
1114} 1126}
1115 1127
1116/* 1128/*
1117 * This is the tasklet that updates LED state on all keyboards 1129 * This is the tasklet that updates LED state on all keyboards
1118 * attached to the box. The reason we use tasklet is that we 1130 * attached to the box. The reason we use tasklet is that we
1119 * need to handle the scenario when keyboard handler is not 1131 * need to handle the scenario when keyboard handler is not
1120 * registered yet but we already getting updates form VT to 1132 * registered yet but we already getting updates from the VT to
1121 * update led state. 1133 * update led state.
1122 */ 1134 */
1123static void kbd_bh(unsigned long dummy) 1135static void kbd_bh(unsigned long dummy)