Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64538
b: refs/heads/master
c: e422397
h: refs/heads/master
v: v3
  • Loading branch information
Shannon Nelson authored and David S. Miller committed Aug 27, 2007
1 parent 7bd25cb commit d7cb045
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: 97a1ad431b89765755d2b5aa8c0777ed637d5c4a
refs/heads/master: e4223976341ffb22fabe5b3a69873966808c83aa
18 changes: 4 additions & 14 deletions trunk/drivers/dma/ioatdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,12 @@ static int ioat_dma_alloc_chan_resources(struct dma_chan *chan)
int i;
LIST_HEAD(tmp_list);

/*
* In-use bit automatically set by reading chanctrl
* If 0, we got it, if 1, someone else did
*/
chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
if (chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE)
return -EBUSY;
/* have we already been set up? */
if (!list_empty(&ioat_chan->free_desc))
return INITIAL_IOAT_DESC_COUNT;

/* Setup register to interrupt and write completion status on error */
chanctrl = IOAT_CHANCTRL_CHANNEL_IN_USE |
IOAT_CHANCTRL_ERR_INT_EN |
chanctrl = IOAT_CHANCTRL_ERR_INT_EN |
IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
IOAT_CHANCTRL_ERR_COMPLETION_EN;
writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
Expand Down Expand Up @@ -282,11 +277,6 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan)
in_use_descs - 1);

ioat_chan->last_completion = ioat_chan->completion_addr = 0;

/* Tell hw the chan is free */
chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
chanctrl &= ~IOAT_CHANCTRL_CHANNEL_IN_USE;
writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET);
}

static struct dma_async_tx_descriptor *
Expand Down

0 comments on commit d7cb045

Please sign in to comment.