Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297814
b: refs/heads/master
c: 49d4bca
h: refs/heads/master
v: v3
  • Loading branch information
Yoshii Takashi authored and Paul Mundt committed Mar 28, 2012
1 parent 70d7f15 commit 4dfe0cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffe0e190f67f23ecf57aae68888860e69ac0d52e
refs/heads/master: 49d4bcaddca977fffdea8b0b71f6e5da96dac78e
15 changes: 10 additions & 5 deletions trunk/drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,17 +1229,20 @@ static void sci_dma_tx_complete(void *arg)
port->icount.tx += sg_dma_len(&s->sg_tx);

async_tx_ack(s->desc_tx);
s->cookie_tx = -EINVAL;
s->desc_tx = NULL;

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(port);

if (!uart_circ_empty(xmit)) {
s->cookie_tx = 0;
schedule_work(&s->work_tx);
} else if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
u16 ctrl = sci_in(port, SCSCR);
sci_out(port, SCSCR, ctrl & ~SCSCR_TIE);
} else {
s->cookie_tx = -EINVAL;
if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
u16 ctrl = sci_in(port, SCSCR);
sci_out(port, SCSCR, ctrl & ~SCSCR_TIE);
}
}

spin_unlock_irqrestore(&port->lock, flags);
Expand Down Expand Up @@ -1501,8 +1504,10 @@ static void sci_start_tx(struct uart_port *port)
}

if (s->chan_tx && !uart_circ_empty(&s->port.state->xmit) &&
s->cookie_tx < 0)
s->cookie_tx < 0) {
s->cookie_tx = 0;
schedule_work(&s->work_tx);
}
#endif

if (!s->chan_tx || port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
Expand Down

0 comments on commit 4dfe0cf

Please sign in to comment.