diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
commit | f52b69f86e27903d6896ed5fa7cd280fec8de532 (patch) | |
tree | 0b213c61386153800afb459ca33e091bdec94570 /drivers/tty | |
parent | 2f7fa1be66dce77608330c5eb918d6360b5525f2 (diff) | |
parent | b7e68d6876dfbab087bc3859211a9efc74cbe30c (diff) |
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH updates from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
sh: Support I/O space swapping where needed.
sh: use set_current_blocked() and block_sigmask()
sh: no need to reset handler if SA_ONESHOT
sh: intc: Fix up section mismatch for intc_ack_data
sh: select ARCH_DISCARD_MEMBLOCK.
sh: Consolidate duplicate _32/_64 unistd definitions.
sh: ecovec: switch SDHI controllers to card polling
sh: Avoid exporting unimplemented syscalls.
sh: add platform_device for RSPI in setup-sh7757
SH: pci-sh7780: enable big-endian operation.
serial: sh-sci: fix a race of DMA submit_tx on transfer
sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
sh: dma: Collect up CHCR of SH7723 and SH7730
sh/next: Fix build fail by asm/system.h in asm/bitops.h
arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
sh: cpufreq: Wire up scaling_available_freqs support.
sh: cpufreq: notify about rate rounding fallback.
sh: cpufreq: Support CPU clock frequency table.
sh: cpufreq: struct device lookup from CPU topology.
sh: cpufreq: percpu struct clk accounting.
...
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index f8db8a70c14e..bf461cf99616 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1229,17 +1229,20 @@ static void sci_dma_tx_complete(void *arg) | |||
1229 | port->icount.tx += sg_dma_len(&s->sg_tx); | 1229 | port->icount.tx += sg_dma_len(&s->sg_tx); |
1230 | 1230 | ||
1231 | async_tx_ack(s->desc_tx); | 1231 | async_tx_ack(s->desc_tx); |
1232 | s->cookie_tx = -EINVAL; | ||
1233 | s->desc_tx = NULL; | 1232 | s->desc_tx = NULL; |
1234 | 1233 | ||
1235 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 1234 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
1236 | uart_write_wakeup(port); | 1235 | uart_write_wakeup(port); |
1237 | 1236 | ||
1238 | if (!uart_circ_empty(xmit)) { | 1237 | if (!uart_circ_empty(xmit)) { |
1238 | s->cookie_tx = 0; | ||
1239 | schedule_work(&s->work_tx); | 1239 | schedule_work(&s->work_tx); |
1240 | } else if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) { | 1240 | } else { |
1241 | u16 ctrl = sci_in(port, SCSCR); | 1241 | s->cookie_tx = -EINVAL; |
1242 | sci_out(port, SCSCR, ctrl & ~SCSCR_TIE); | 1242 | if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) { |
1243 | u16 ctrl = sci_in(port, SCSCR); | ||
1244 | sci_out(port, SCSCR, ctrl & ~SCSCR_TIE); | ||
1245 | } | ||
1243 | } | 1246 | } |
1244 | 1247 | ||
1245 | spin_unlock_irqrestore(&port->lock, flags); | 1248 | spin_unlock_irqrestore(&port->lock, flags); |
@@ -1501,8 +1504,10 @@ static void sci_start_tx(struct uart_port *port) | |||
1501 | } | 1504 | } |
1502 | 1505 | ||
1503 | if (s->chan_tx && !uart_circ_empty(&s->port.state->xmit) && | 1506 | if (s->chan_tx && !uart_circ_empty(&s->port.state->xmit) && |
1504 | s->cookie_tx < 0) | 1507 | s->cookie_tx < 0) { |
1508 | s->cookie_tx = 0; | ||
1505 | schedule_work(&s->work_tx); | 1509 | schedule_work(&s->work_tx); |
1510 | } | ||
1506 | #endif | 1511 | #endif |
1507 | 1512 | ||
1508 | if (!s->chan_tx || port->type == PORT_SCIFA || port->type == PORT_SCIFB) { | 1513 | if (!s->chan_tx || port->type == PORT_SCIFA || port->type == PORT_SCIFB) { |