Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165830
b: refs/heads/master
c: ea25968
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams committed Sep 9, 2009
1 parent ed72e8c commit ec6d753
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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: 308136d1abcb2d759bac40ed4f5d42ac4af59d8b
refs/heads/master: ea25968a32a621b02c3715d6b649f0c6ef53c24e
7 changes: 4 additions & 3 deletions trunk/drivers/dma/ioat/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx)
dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie);

/* write address into NextDescriptor field of last desc in chain */
first = to_ioat_desc(tx->tx_list.next);
first = to_ioat_desc(desc->tx_list.next);
chain_tail = to_ioat_desc(ioat->used_desc.prev);
/* make descriptor updates globally visible before chaining */
wmb();
chain_tail->hw->next = first->txd.phys;
list_splice_tail_init(&tx->tx_list, &ioat->used_desc);
list_splice_tail_init(&desc->tx_list, &ioat->used_desc);
dump_desc_dbg(ioat, chain_tail);
dump_desc_dbg(ioat, first);

Expand Down Expand Up @@ -297,6 +297,7 @@ ioat_dma_alloc_descriptor(struct ioat_dma_chan *ioat, gfp_t flags)

memset(desc, 0, sizeof(*desc));

INIT_LIST_HEAD(&desc_sw->tx_list);
dma_async_tx_descriptor_init(&desc_sw->txd, &ioat->base.common);
desc_sw->txd.tx_submit = ioat1_tx_submit;
desc_sw->hw = desc;
Expand Down Expand Up @@ -521,7 +522,7 @@ ioat1_dma_prep_memcpy(struct dma_chan *c, dma_addr_t dma_dest,

desc->txd.flags = flags;
desc->len = total_len;
list_splice(&chain, &desc->txd.tx_list);
list_splice(&chain, &desc->tx_list);
hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT);
hw->ctl_f.compl_write = 1;
hw->tx_cnt = tx_cnt;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/dma/ioat/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,15 @@ ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie,
* struct ioat_desc_sw - wrapper around hardware descriptor
* @hw: hardware DMA descriptor
* @node: this descriptor will either be on the free list,
* or attached to a transaction list (async_tx.tx_list)
* or attached to a transaction list (tx_list)
* @txd: the generic software descriptor for all engines
* @id: identifier for debug
*/
struct ioat_desc_sw {
struct ioat_dma_descriptor *hw;
struct list_head node;
size_t len;
struct list_head tx_list;
struct dma_async_tx_descriptor txd;
#ifdef DEBUG
int id;
Expand Down

0 comments on commit ec6d753

Please sign in to comment.