aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r--drivers/dma/ioat/dma.c4
-rw-r--r--drivers/dma/ioat/dma.h2
-rw-r--r--drivers/dma/ioat/hw.h6
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index abc96c4c0796..f59b6f42f866 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -396,7 +396,7 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx)
396 dump_desc_dbg(ioat, chain_tail); 396 dump_desc_dbg(ioat, chain_tail);
397 dump_desc_dbg(ioat, first); 397 dump_desc_dbg(ioat, first);
398 398
399 ioat->pending += desc->tx_cnt; 399 ioat->pending += desc->hw->tx_cnt;
400 if (ioat->pending >= ioat_pending_level) 400 if (ioat->pending >= ioat_pending_level)
401 __ioat1_dma_memcpy_issue_pending(ioat); 401 __ioat1_dma_memcpy_issue_pending(ioat);
402 spin_unlock_bh(&ioat->desc_lock); 402 spin_unlock_bh(&ioat->desc_lock);
@@ -655,11 +655,11 @@ ioat1_dma_prep_memcpy(struct dma_chan *c, dma_addr_t dma_dest,
655 spin_unlock_bh(&ioat->desc_lock); 655 spin_unlock_bh(&ioat->desc_lock);
656 656
657 desc->txd.flags = flags; 657 desc->txd.flags = flags;
658 desc->tx_cnt = tx_cnt;
659 desc->len = total_len; 658 desc->len = total_len;
660 list_splice(&chain, &desc->txd.tx_list); 659 list_splice(&chain, &desc->txd.tx_list);
661 hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT); 660 hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT);
662 hw->ctl_f.compl_write = 1; 661 hw->ctl_f.compl_write = 1;
662 hw->tx_cnt = tx_cnt;
663 dump_desc_dbg(ioat, desc); 663 dump_desc_dbg(ioat, desc);
664 664
665 return &desc->txd; 665 return &desc->txd;
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index e47083b52ee7..ec851cf5345c 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -165,14 +165,12 @@ ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie,
165 * @hw: hardware DMA descriptor 165 * @hw: hardware DMA descriptor
166 * @node: this descriptor will either be on the free list, 166 * @node: this descriptor will either be on the free list,
167 * or attached to a transaction list (async_tx.tx_list) 167 * or attached to a transaction list (async_tx.tx_list)
168 * @tx_cnt: number of descriptors required to complete the transaction
169 * @txd: the generic software descriptor for all engines 168 * @txd: the generic software descriptor for all engines
170 * @id: identifier for debug 169 * @id: identifier for debug
171 */ 170 */
172struct ioat_desc_sw { 171struct ioat_desc_sw {
173 struct ioat_dma_descriptor *hw; 172 struct ioat_dma_descriptor *hw;
174 struct list_head node; 173 struct list_head node;
175 int tx_cnt;
176 size_t len; 174 size_t len;
177 struct dma_async_tx_descriptor txd; 175 struct dma_async_tx_descriptor txd;
178 #ifdef DEBUG 176 #ifdef DEBUG
diff --git a/drivers/dma/ioat/hw.h b/drivers/dma/ioat/hw.h
index e13f3ed47763..7481fb13ce00 100644
--- a/drivers/dma/ioat/hw.h
+++ b/drivers/dma/ioat/hw.h
@@ -63,7 +63,11 @@ struct ioat_dma_descriptor {
63 uint64_t next; 63 uint64_t next;
64 uint64_t rsv1; 64 uint64_t rsv1;
65 uint64_t rsv2; 65 uint64_t rsv2;
66 uint64_t user1; 66 /* store some driver data in an unused portion of the descriptor */
67 union {
68 uint64_t user1;
69 uint64_t tx_cnt;
70 };
67 uint64_t user2; 71 uint64_t user2;
68}; 72};
69#endif 73#endif