aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunhv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sunhv.c')
-rw-r--r--drivers/serial/sunhv.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index 378a1784ce9a..8537839f9abb 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -210,9 +210,6 @@ static void sunhv_stop_tx(struct uart_port *port)
210static void sunhv_start_tx(struct uart_port *port) 210static void sunhv_start_tx(struct uart_port *port)
211{ 211{
212 struct circ_buf *xmit = &port->info->xmit; 212 struct circ_buf *xmit = &port->info->xmit;
213 unsigned long flags;
214
215 spin_lock_irqsave(&port->lock, flags);
216 213
217 while (!uart_circ_empty(xmit)) { 214 while (!uart_circ_empty(xmit)) {
218 long status = hypervisor_con_putchar(xmit->buf[xmit->tail]); 215 long status = hypervisor_con_putchar(xmit->buf[xmit->tail]);
@@ -223,8 +220,6 @@ static void sunhv_start_tx(struct uart_port *port)
223 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); 220 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
224 port->icount.tx++; 221 port->icount.tx++;
225 } 222 }
226
227 spin_unlock_irqrestore(&port->lock, flags);
228} 223}
229 224
230/* port->lock is not held. */ 225/* port->lock is not held. */
@@ -259,7 +254,7 @@ static void sunhv_break_ctl(struct uart_port *port, int break_state)
259{ 254{
260 if (break_state) { 255 if (break_state) {
261 unsigned long flags; 256 unsigned long flags;
262 int limit = 10000; 257 int limit = 1000000;
263 258
264 spin_lock_irqsave(&port->lock, flags); 259 spin_lock_irqsave(&port->lock, flags);
265 260
@@ -267,6 +262,7 @@ static void sunhv_break_ctl(struct uart_port *port, int break_state)
267 long status = hypervisor_con_putchar(CON_BREAK); 262 long status = hypervisor_con_putchar(CON_BREAK);
268 if (status == HV_EOK) 263 if (status == HV_EOK)
269 break; 264 break;
265 udelay(2);
270 } 266 }
271 267
272 spin_unlock_irqrestore(&port->lock, flags); 268 spin_unlock_irqrestore(&port->lock, flags);