Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165817
b: refs/heads/master
c: e323271
h: refs/heads/master
i:
  165815: ed481b1
v: v3
  • Loading branch information
Dan Williams committed Sep 9, 2009
1 parent 1c6e2d6 commit 4cb1455
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 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: b265b11fc1a0bd6ae5a7fde12e374583a52ab326
refs/heads/master: e3232714d465c42ac631929b990f5e35e2d8a955
4 changes: 2 additions & 2 deletions trunk/drivers/dma/ioat/dma_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static void ioat2_cleanup(struct ioat2_dma_chan *ioat)
spin_unlock_bh(&chan->cleanup_lock);
}

static void ioat2_cleanup_tasklet(unsigned long data)
void ioat2_cleanup_tasklet(unsigned long data)
{
struct ioat2_dma_chan *ioat = (void *) data;

Expand Down Expand Up @@ -258,7 +258,7 @@ static void ioat2_restart_channel(struct ioat2_dma_chan *ioat)
__ioat2_restart_chan(ioat);
}

static void ioat2_timer_event(unsigned long data)
void ioat2_timer_event(unsigned long data)
{
struct ioat2_dma_chan *ioat = (void *) data;
struct ioat_chan_common *chan = &ioat->base;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/dma/ioat/dma_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,7 @@ enum dma_status ioat2_is_complete(struct dma_chan *c, dma_cookie_t cookie,
void __ioat2_restart_chan(struct ioat2_dma_chan *ioat);
bool reshape_ring(struct ioat2_dma_chan *ioat, int order);
void __ioat2_issue_pending(struct ioat2_dma_chan *ioat);
void ioat2_cleanup_tasklet(unsigned long data);
void ioat2_timer_event(unsigned long data);
extern struct kobj_type ioat2_ktype;
#endif /* IOATDMA_V2_H */
25 changes: 18 additions & 7 deletions trunk/drivers/dma/ioat/dma_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,30 +1117,25 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
struct dma_device *dma;
struct dma_chan *c;
struct ioat_chan_common *chan;
bool is_raid_device = false;
int err;
u16 dev_id;
u32 cap;

device->enumerate_channels = ioat2_enumerate_channels;
device->cleanup_tasklet = ioat3_cleanup_tasklet;
device->timer_fn = ioat3_timer_event;
device->self_test = ioat3_dma_self_test;
dma = &device->common;
dma->device_prep_dma_memcpy = ioat2_dma_prep_memcpy_lock;
dma->device_issue_pending = ioat2_issue_pending;
dma->device_alloc_chan_resources = ioat2_alloc_chan_resources;
dma->device_free_chan_resources = ioat2_free_chan_resources;
dma->device_is_tx_complete = ioat3_is_complete;

dma_cap_set(DMA_INTERRUPT, dma->cap_mask);
dma->device_prep_dma_interrupt = ioat3_prep_interrupt_lock;

cap = readl(device->reg_base + IOAT_DMA_CAP_OFFSET);
if (cap & IOAT_CAP_FILL_BLOCK) {
dma_cap_set(DMA_MEMSET, dma->cap_mask);
dma->device_prep_dma_memset = ioat3_prep_memset_lock;
}
if (cap & IOAT_CAP_XOR) {
is_raid_device = true;
dma->max_xor = 8;
dma->xor_align = 2;

Expand All @@ -1151,6 +1146,7 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
dma->device_prep_dma_xor_val = ioat3_prep_xor_val;
}
if (cap & IOAT_CAP_PQ) {
is_raid_device = true;
dma_set_maxpq(dma, 8, 0);
dma->pq_align = 2;

Expand All @@ -1171,6 +1167,21 @@ int __devinit ioat3_dma_probe(struct ioatdma_device *device, int dca)
dma->device_prep_dma_xor_val = ioat3_prep_pqxor_val;
}
}
if (is_raid_device && (cap & IOAT_CAP_FILL_BLOCK)) {
dma_cap_set(DMA_MEMSET, dma->cap_mask);
dma->device_prep_dma_memset = ioat3_prep_memset_lock;
}


if (is_raid_device) {
dma->device_is_tx_complete = ioat3_is_complete;
device->cleanup_tasklet = ioat3_cleanup_tasklet;
device->timer_fn = ioat3_timer_event;
} else {
dma->device_is_tx_complete = ioat2_is_complete;
device->cleanup_tasklet = ioat2_cleanup_tasklet;
device->timer_fn = ioat2_timer_event;
}

/* -= IOAT ver.3 workarounds =- */
/* Write CHANERRMSK_INT with 3E07h to mask out the errors
Expand Down

0 comments on commit 4cb1455

Please sign in to comment.