Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165771
b: refs/heads/master
c: f6ab95b
h: refs/heads/master
i:
  165769: c027f87
  165767: 89351da
v: v3
  • Loading branch information
Dan Williams committed Sep 9, 2009
1 parent 25e1d8e commit 7dfe621
Show file tree
Hide file tree
Showing 4 changed files with 11 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: bb3207863014c7310593146f11fbc6573eab43c8
refs/heads/master: f6ab95b55735fa03cad8d0f966647e5df206e207
10 changes: 3 additions & 7 deletions trunk/drivers/dma/ioat/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ static int ioat1_dma_alloc_chan_resources(struct dma_chan *c)
struct ioat_dma_chan *ioat = to_ioat_chan(c);
struct ioat_chan_common *chan = &ioat->base;
struct ioat_desc_sw *desc;
u16 chanctrl;
u32 chanerr;
int i;
LIST_HEAD(tmp_list);
Expand All @@ -462,10 +461,7 @@ static int ioat1_dma_alloc_chan_resources(struct dma_chan *c)
return ioat->desccount;

/* Setup register to interrupt and write completion status on error */
chanctrl = IOAT_CHANCTRL_ERR_INT_EN |
IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
IOAT_CHANCTRL_ERR_COMPLETION_EN;
writew(chanctrl, chan->reg_base + IOAT_CHANCTRL_OFFSET);
writew(IOAT_CHANCTRL_RUN, chan->reg_base + IOAT_CHANCTRL_OFFSET);

chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET);
if (chanerr) {
Expand Down Expand Up @@ -672,9 +668,9 @@ ioat1_dma_prep_memcpy(struct dma_chan *c, dma_addr_t dma_dest,
static void ioat1_cleanup_tasklet(unsigned long data)
{
struct ioat_dma_chan *chan = (void *)data;

ioat1_cleanup(chan);
writew(IOAT_CHANCTRL_INT_DISABLE,
chan->base.reg_base + IOAT_CHANCTRL_OFFSET);
writew(IOAT_CHANCTRL_RUN, chan->base.reg_base + IOAT_CHANCTRL_OFFSET);
}

static void ioat_unmap(struct pci_dev *pdev, dma_addr_t addr, size_t len,
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/dma/ioat/dma_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ static void ioat2_cleanup_tasklet(unsigned long data)
struct ioat2_dma_chan *ioat = (void *) data;

ioat2_cleanup(ioat);
writew(IOAT_CHANCTRL_INT_DISABLE,
ioat->base.reg_base + IOAT_CHANCTRL_OFFSET);
writew(IOAT_CHANCTRL_RUN, ioat->base.reg_base + IOAT_CHANCTRL_OFFSET);
}

/**
Expand Down Expand Up @@ -454,7 +453,6 @@ static int ioat2_alloc_chan_resources(struct dma_chan *c)
struct ioat2_dma_chan *ioat = to_ioat2_chan(c);
struct ioat_chan_common *chan = &ioat->base;
struct ioat_ring_ent **ring;
u16 chanctrl;
u32 chanerr;
int descs;
int i;
Expand All @@ -464,9 +462,7 @@ static int ioat2_alloc_chan_resources(struct dma_chan *c)
return 1 << ioat->alloc_order;

/* Setup register to interrupt and write completion status on error */
chanctrl = IOAT_CHANCTRL_ERR_INT_EN | IOAT_CHANCTRL_ANY_ERR_ABORT_EN |
IOAT_CHANCTRL_ERR_COMPLETION_EN;
writew(chanctrl, chan->reg_base + IOAT_CHANCTRL_OFFSET);
writew(IOAT_CHANCTRL_RUN, chan->reg_base + IOAT_CHANCTRL_OFFSET);

chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET);
if (chanerr) {
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/dma/ioat/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@
#define IOAT_CHANCTRL_ERR_INT_EN 0x0010
#define IOAT_CHANCTRL_ANY_ERR_ABORT_EN 0x0008
#define IOAT_CHANCTRL_ERR_COMPLETION_EN 0x0004
#define IOAT_CHANCTRL_INT_DISABLE 0x0001
#define IOAT_CHANCTRL_INT_REARM 0x0001
#define IOAT_CHANCTRL_RUN (IOAT_CHANCTRL_INT_REARM |\
IOAT_CHANCTRL_ERR_COMPLETION_EN |\
IOAT_CHANCTRL_ANY_ERR_ABORT_EN |\
IOAT_CHANCTRL_ERR_INT_EN)

#define IOAT_DMA_COMP_OFFSET 0x02 /* 16-bit DMA channel compatibility */
#define IOAT_DMA_COMP_V1 0x0001 /* Compatibility with DMA version 1 */
Expand Down

0 comments on commit 7dfe621

Please sign in to comment.