aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-08 20:53:02 -0400
committerDan Williams <dan.j.williams@intel.com>2009-09-08 20:53:02 -0400
commitea25968a32a621b02c3715d6b649f0c6ef53c24e (patch)
tree8da75c38c0ac0690eb03e89ccf146d062ba4d855
parent308136d1abcb2d759bac40ed4f5d42ac4af59d8b (diff)
ioat: implement a private tx_list
Drop ioatdma's use of tx_list from struct dma_async_tx_descriptor in preparation for removal of this field. Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/dma/ioat/dma.c7
-rw-r--r--drivers/dma/ioat/dma.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 17a518d0386f..21527b89590c 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -251,12 +251,12 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx)
251 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie); 251 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie);
252 252
253 /* write address into NextDescriptor field of last desc in chain */ 253 /* write address into NextDescriptor field of last desc in chain */
254 first = to_ioat_desc(tx->tx_list.next); 254 first = to_ioat_desc(desc->tx_list.next);
255 chain_tail = to_ioat_desc(ioat->used_desc.prev); 255 chain_tail = to_ioat_desc(ioat->used_desc.prev);
256 /* make descriptor updates globally visible before chaining */ 256 /* make descriptor updates globally visible before chaining */
257 wmb(); 257 wmb();
258 chain_tail->hw->next = first->txd.phys; 258 chain_tail->hw->next = first->txd.phys;
259 list_splice_tail_init(&tx->tx_list, &ioat->used_desc); 259 list_splice_tail_init(&desc->tx_list, &ioat->used_desc);
260 dump_desc_dbg(ioat, chain_tail); 260 dump_desc_dbg(ioat, chain_tail);
261 dump_desc_dbg(ioat, first); 261 dump_desc_dbg(ioat, first);
262 262
@@ -297,6 +297,7 @@ ioat_dma_alloc_descriptor(struct ioat_dma_chan *ioat, gfp_t flags)
297 297
298 memset(desc, 0, sizeof(*desc)); 298 memset(desc, 0, sizeof(*desc));
299 299
300 INIT_LIST_HEAD(&desc_sw->tx_list);
300 dma_async_tx_descriptor_init(&desc_sw->txd, &ioat->base.common); 301 dma_async_tx_descriptor_init(&desc_sw->txd, &ioat->base.common);
301 desc_sw->txd.tx_submit = ioat1_tx_submit; 302 desc_sw->txd.tx_submit = ioat1_tx_submit;
302 desc_sw->hw = desc; 303 desc_sw->hw = desc;
@@ -521,7 +522,7 @@ ioat1_dma_prep_memcpy(struct dma_chan *c, dma_addr_t dma_dest,
521 522
522 desc->txd.flags = flags; 523 desc->txd.flags = flags;
523 desc->len = total_len; 524 desc->len = total_len;
524 list_splice(&chain, &desc->txd.tx_list); 525 list_splice(&chain, &desc->tx_list);
525 hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT); 526 hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT);
526 hw->ctl_f.compl_write = 1; 527 hw->ctl_f.compl_write = 1;
527 hw->tx_cnt = tx_cnt; 528 hw->tx_cnt = tx_cnt;
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index d9d6a7e3cd76..8966fa5453a7 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -157,7 +157,7 @@ ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie,
157 * struct ioat_desc_sw - wrapper around hardware descriptor 157 * struct ioat_desc_sw - wrapper around hardware descriptor
158 * @hw: hardware DMA descriptor 158 * @hw: hardware DMA descriptor
159 * @node: this descriptor will either be on the free list, 159 * @node: this descriptor will either be on the free list,
160 * or attached to a transaction list (async_tx.tx_list) 160 * or attached to a transaction list (tx_list)
161 * @txd: the generic software descriptor for all engines 161 * @txd: the generic software descriptor for all engines
162 * @id: identifier for debug 162 * @id: identifier for debug
163 */ 163 */
@@ -165,6 +165,7 @@ struct ioat_desc_sw {
165 struct ioat_dma_descriptor *hw; 165 struct ioat_dma_descriptor *hw;
166 struct list_head node; 166 struct list_head node;
167 size_t len; 167 size_t len;
168 struct list_head tx_list;
168 struct dma_async_tx_descriptor txd; 169 struct dma_async_tx_descriptor txd;
169 #ifdef DEBUG 170 #ifdef DEBUG
170 int id; 171 int id;