Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273883
b: refs/heads/master
c: 70a207a
h: refs/heads/master
i:
  273881: d0b9635
  273879: ca14309
v: v3
  • Loading branch information
Per Forlin authored and Vinod Koul committed Sep 5, 2011
1 parent ef83bf5 commit 311e6e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 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: 270e779036ff144d6c6904ce9480f0d70ff93e86
refs/heads/master: 70a207ad4db2f0c60308b3f32086263c438c67a3
22 changes: 12 additions & 10 deletions trunk/drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,11 @@ static struct d40_desc *d40_first_active_get(struct d40_chan *d40c)
return d;
}

/* remove desc from current queue and add it to the pending_queue */
static void d40_desc_queue(struct d40_chan *d40c, struct d40_desc *desc)
{
d40_desc_remove(desc);
desc->is_in_client_list = false;
list_add_tail(&desc->node, &d40c->pending_queue);
}

Expand Down Expand Up @@ -803,6 +806,7 @@ static int d40_channel_execute_command(struct d40_chan *d40c,
static void d40_term_all(struct d40_chan *d40c)
{
struct d40_desc *d40d;
struct d40_desc *_d;

/* Release active descriptors */
while ((d40d = d40_first_active_get(d40c))) {
Expand All @@ -822,6 +826,14 @@ static void d40_term_all(struct d40_chan *d40c)
d40_desc_free(d40c, d40d);
}

/* Release client owned descriptors */
if (!list_empty(&d40c->client))
list_for_each_entry_safe(d40d, _d, &d40c->client, node) {
d40_desc_remove(d40d);
d40_desc_free(d40c, d40d);
}


d40c->pending_tx = 0;
d40c->busy = false;
}
Expand Down Expand Up @@ -1594,20 +1606,10 @@ static int d40_free_dma(struct d40_chan *d40c)
u32 event;
struct d40_phy_res *phy = d40c->phy_chan;
bool is_src;
struct d40_desc *d;
struct d40_desc *_d;


/* Terminate all queued and active transfers */
d40_term_all(d40c);

/* Release client owned descriptors */
if (!list_empty(&d40c->client))
list_for_each_entry_safe(d, _d, &d40c->client, node) {
d40_desc_remove(d);
d40_desc_free(d40c, d);
}

if (phy == NULL) {
chan_err(d40c, "phy == null\n");
return -EINVAL;
Expand Down

0 comments on commit 311e6e1

Please sign in to comment.