Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145409
b: refs/heads/master
c: 138ef01
h: refs/heads/master
i:
  145407: 166de48
v: v3
  • Loading branch information
Ira Snyder authored and Li Yang committed May 22, 2009
1 parent 7b88e52 commit 80dde50
Show file tree
Hide file tree
Showing 2 changed files with 7 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: f47edc6dab11801c2e97088ba7bbce042ded867c
refs/heads/master: 138ef0185177a6d221d24b6aa8f12d867fbbef90
10 changes: 6 additions & 4 deletions trunk/drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,15 +598,16 @@ static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan)
dma_addr_t next_dest_addr;
unsigned long flags;

spin_lock_irqsave(&fsl_chan->desc_lock, flags);

if (!dma_is_idle(fsl_chan))
return;
goto out_unlock;

dma_halt(fsl_chan);

/* If there are some link descriptors
* not transfered in queue. We need to start it.
*/
spin_lock_irqsave(&fsl_chan->desc_lock, flags);

/* Find the first un-transfer desciptor */
for (ld_node = fsl_chan->ld_queue.next;
Expand All @@ -617,8 +618,6 @@ static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan)
fsl_chan->common.cookie) == DMA_SUCCESS);
ld_node = ld_node->next);

spin_unlock_irqrestore(&fsl_chan->desc_lock, flags);

if (ld_node != &fsl_chan->ld_queue) {
/* Get the ld start address from ld_queue */
next_dest_addr = to_fsl_desc(ld_node)->async_tx.phys;
Expand All @@ -630,6 +629,9 @@ static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan)
set_cdar(fsl_chan, 0);
set_ndar(fsl_chan, 0);
}

out_unlock:
spin_unlock_irqrestore(&fsl_chan->desc_lock, flags);
}

/**
Expand Down

0 comments on commit 80dde50

Please sign in to comment.