Skip to content

Commit

Permalink
serial: 8250_dma: TX optimisation
Browse files Browse the repository at this point in the history
Remove one useless wakeup, and do not use DMA with zero byte
transfers.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Heikki Krogerus authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent 6f3fe3b commit a3b0397
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/serial/8250/8250_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ int serial8250_tx_dma(struct uart_8250_port *p)
struct circ_buf *xmit = &p->port.state->xmit;
struct dma_async_tx_descriptor *desc;

if (dma->tx_running) {
uart_write_wakeup(&p->port);
if (dma->tx_running)
return -EBUSY;
}

dma->tx_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
if (!dma->tx_size)
return -EINVAL;

desc = dmaengine_prep_slave_single(dma->txchan,
dma->tx_addr + xmit->tail,
Expand Down

0 comments on commit a3b0397

Please sign in to comment.