Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354797
b: refs/heads/master
c: 6f3fe3b
h: refs/heads/master
i:
  354795: ac3acaf
v: v3
  • Loading branch information
Heikki Krogerus authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent d1a7a19 commit 2e84239
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 852e4a8152b427c3f318bb0e1b5e938d64dcdc32
refs/heads/master: 6f3fe3b1027bf50c0a0859e5c9ee93b174b95543
11 changes: 7 additions & 4 deletions trunk/drivers/tty/serial/8250/8250_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,22 @@ static void __dma_rx_complete(void *param)
{
struct uart_8250_port *p = param;
struct uart_8250_dma *dma = p->dma;
struct tty_struct *tty = p->port.state->port.tty;
struct tty_port *tty_port = &p->port.state->port;
struct dma_tx_state state;
int count;

dma_sync_single_for_cpu(dma->rxchan->device->dev, dma->rx_addr,
dma->rx_size, DMA_FROM_DEVICE);

dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
dmaengine_terminate_all(dma->rxchan);

tty_insert_flip_string(tty, dma->rx_buf, dma->rx_size - state.residue);
p->port.icount.rx += dma->rx_size - state.residue;
count = dma->rx_size - state.residue;

tty_flip_buffer_push(tty);
tty_insert_flip_string(tty_port, dma->rx_buf, count);
p->port.icount.rx += count;

tty_flip_buffer_push(tty_port);
}

int serial8250_tx_dma(struct uart_8250_port *p)
Expand Down

0 comments on commit 2e84239

Please sign in to comment.