Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118653
b: refs/heads/master
c: c3d4f44
h: refs/heads/master
i:
  118651: f1db444
v: v3
  • Loading branch information
Maciej Sosnowski authored and David S. Miller committed Nov 10, 2008
1 parent 222988c commit 83d081a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd0fcf5c29dd0339c5f5d86eb2cbe9fdad5bcd73
refs/heads/master: c3d4f44f50b65b0b0290e357f8739cfb3f4bcaca
7 changes: 7 additions & 0 deletions trunk/drivers/dma/ioat_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,12 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan)
struct ioat_desc_sw *desc, *_desc;
int in_use_descs = 0;

/* Before freeing channel resources first check
* if they have been previously allocated for this channel.
*/
if (ioat_chan->desccount == 0)
return;

tasklet_disable(&ioat_chan->cleanup_task);
ioat_dma_memcpy_cleanup(ioat_chan);

Expand Down Expand Up @@ -869,6 +875,7 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan)
ioat_chan->last_completion = ioat_chan->completion_addr = 0;
ioat_chan->pending = 0;
ioat_chan->dmacount = 0;
ioat_chan->desccount = 0;
ioat_chan->watchdog_completion = 0;
ioat_chan->last_compl_desc_addr_hw = 0;
ioat_chan->watchdog_tcp_cookie =
Expand Down

0 comments on commit 83d081a

Please sign in to comment.