Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65124
b: refs/heads/master
c: 6247cdc
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams committed Sep 24, 2007
1 parent 9c17801 commit f284f54
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: c5d2b9f444b8d9f5ad7c5e583686c119ba3a9ba7
refs/heads/master: 6247cdc2cd334dad0ea5428245a7d8f4b075f21e
12 changes: 10 additions & 2 deletions trunk/crypto/async_tx/async_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,23 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
{
enum dma_status status;
struct dma_async_tx_descriptor *iter;
struct dma_async_tx_descriptor *parent;

if (!tx)
return DMA_SUCCESS;

/* poll through the dependency chain, return when tx is complete */
do {
iter = tx;
while (iter->cookie == -EBUSY)
iter = iter->parent;

/* find the root of the unsubmitted dependency chain */
while (iter->cookie == -EBUSY) {
parent = iter->parent;
if (parent && parent->cookie == -EBUSY)
iter = iter->parent;
else
break;
}

status = dma_sync_wait(iter->chan, iter->cookie);
} while (status == DMA_IN_PROGRESS || (iter != tx));
Expand Down

0 comments on commit f284f54

Please sign in to comment.