Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191586
b: refs/heads/master
c: f354a38
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Mar 23, 2010
1 parent caa5999 commit e63f9d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 02ca5083f60521d09f13224596564a405108bc4c
refs/heads/master: f354a38175f5219146f4675dca770e114cf3c502
14 changes: 6 additions & 8 deletions trunk/drivers/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,10 @@ static void sci_dma_tx_complete(void *arg)

spin_lock_irqsave(&port->lock, flags);

xmit->tail += s->sg_tx.length;
xmit->tail += sg_dma_len(&s->sg_tx);
xmit->tail &= UART_XMIT_SIZE - 1;

port->icount.tx += s->sg_tx.length;
port->icount.tx += sg_dma_len(&s->sg_tx);

async_tx_ack(s->desc_tx);
s->cookie_tx = -EINVAL;
Expand Down Expand Up @@ -1134,14 +1134,13 @@ static void work_fn_tx(struct work_struct *work)
*/
spin_lock_irq(&port->lock);
sg->offset = xmit->tail & (UART_XMIT_SIZE - 1);
sg->dma_address = (sg_dma_address(sg) & ~(UART_XMIT_SIZE - 1)) +
sg_dma_address(sg) = (sg_dma_address(sg) & ~(UART_XMIT_SIZE - 1)) +
sg->offset;
sg->length = min((int)CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE),
sg_dma_len(sg) = min((int)CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE),
CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE));
sg->dma_length = sg->length;
spin_unlock_irq(&port->lock);

BUG_ON(!sg->length);
BUG_ON(!sg_dma_len(sg));

desc = chan->device->device_prep_slave_sg(chan,
sg, s->sg_len_tx, DMA_TO_DEVICE,
Expand Down Expand Up @@ -1342,8 +1341,7 @@ static void sci_request_dma(struct uart_port *port)
sg_init_table(sg, 1);
sg_set_page(sg, virt_to_page(buf[i]), s->buf_len_rx,
(int)buf[i] & ~PAGE_MASK);
sg->dma_address = dma[i];
sg->dma_length = sg->length;
sg_dma_address(sg) = dma[i];
}

INIT_WORK(&s->work_rx, work_fn_rx);
Expand Down

0 comments on commit e63f9d0

Please sign in to comment.