diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 20:05:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 20:05:46 -0400 |
commit | 6f68fbaafbaa033205cd131d3e1f3c4b914e9b78 (patch) | |
tree | 56b434496064ed170f94381e3ec4c6c340b71376 /drivers/dma/ioat/dma.h | |
parent | 6e4513972a5ad28517477d21f301a02ac7a0df76 (diff) | |
parent | 0b28330e39bbe0ffee4c56b09fc415fcec595ea3 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
DMAENGINE: extend the control command to include an arg
async_tx: trim dma_async_tx_descriptor in 'no channel switch' case
DMAENGINE: DMA40 fix for allocation of logical channel 0
DMAENGINE: DMA40 support paused channel status
dmaengine: mpc512x: Use resource_size
DMA ENGINE: Do not reset 'private' of channel
ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
ioat3: disable cacheline-unaligned transfers for raid operations
ioat2,3: convert to producer/consumer locking
ioat: convert to circ_buf
DMAENGINE: Support for ST-Ericssons DMA40 block v3
async_tx: use of kzalloc/kfree requires the include of slab.h
dmaengine: provide helper for setting txstate
DMAENGINE: generic channel status v2
DMAENGINE: generic slave control v2
dma: timb-dma: Update comment and fix compiler warning
dma: Add timb-dma
DMAENGINE: COH 901 318 fix bytesleft
DMAENGINE: COH 901 318 rename confusing vars
Diffstat (limited to 'drivers/dma/ioat/dma.h')
-rw-r--r-- | drivers/dma/ioat/dma.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 86b97ac8774e..6d3a73b57e54 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h | |||
@@ -96,6 +96,7 @@ struct ioat_chan_common { | |||
96 | #define IOAT_COMPLETION_ACK 1 | 96 | #define IOAT_COMPLETION_ACK 1 |
97 | #define IOAT_RESET_PENDING 2 | 97 | #define IOAT_RESET_PENDING 2 |
98 | #define IOAT_KOBJ_INIT_FAIL 3 | 98 | #define IOAT_KOBJ_INIT_FAIL 3 |
99 | #define IOAT_RESHAPE_PENDING 4 | ||
99 | struct timer_list timer; | 100 | struct timer_list timer; |
100 | #define COMPLETION_TIMEOUT msecs_to_jiffies(100) | 101 | #define COMPLETION_TIMEOUT msecs_to_jiffies(100) |
101 | #define IDLE_TIMEOUT msecs_to_jiffies(2000) | 102 | #define IDLE_TIMEOUT msecs_to_jiffies(2000) |
@@ -142,15 +143,14 @@ static inline struct ioat_dma_chan *to_ioat_chan(struct dma_chan *c) | |||
142 | } | 143 | } |
143 | 144 | ||
144 | /** | 145 | /** |
145 | * ioat_is_complete - poll the status of an ioat transaction | 146 | * ioat_tx_status - poll the status of an ioat transaction |
146 | * @c: channel handle | 147 | * @c: channel handle |
147 | * @cookie: transaction identifier | 148 | * @cookie: transaction identifier |
148 | * @done: if set, updated with last completed transaction | 149 | * @txstate: if set, updated with the transaction state |
149 | * @used: if set, updated with last used transaction | ||
150 | */ | 150 | */ |
151 | static inline enum dma_status | 151 | static inline enum dma_status |
152 | ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie, | 152 | ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie, |
153 | dma_cookie_t *done, dma_cookie_t *used) | 153 | struct dma_tx_state *txstate) |
154 | { | 154 | { |
155 | struct ioat_chan_common *chan = to_chan_common(c); | 155 | struct ioat_chan_common *chan = to_chan_common(c); |
156 | dma_cookie_t last_used; | 156 | dma_cookie_t last_used; |
@@ -159,10 +159,7 @@ ioat_is_complete(struct dma_chan *c, dma_cookie_t cookie, | |||
159 | last_used = c->cookie; | 159 | last_used = c->cookie; |
160 | last_complete = chan->completed_cookie; | 160 | last_complete = chan->completed_cookie; |
161 | 161 | ||
162 | if (done) | 162 | dma_set_tx_state(txstate, last_complete, last_used, 0); |
163 | *done = last_complete; | ||
164 | if (used) | ||
165 | *used = last_used; | ||
166 | 163 | ||
167 | return dma_async_is_complete(cookie, last_complete, last_used); | 164 | return dma_async_is_complete(cookie, last_complete, last_used); |
168 | } | 165 | } |
@@ -338,8 +335,8 @@ struct dca_provider * __devinit ioat_dca_init(struct pci_dev *pdev, | |||
338 | unsigned long ioat_get_current_completion(struct ioat_chan_common *chan); | 335 | unsigned long ioat_get_current_completion(struct ioat_chan_common *chan); |
339 | void ioat_init_channel(struct ioatdma_device *device, | 336 | void ioat_init_channel(struct ioatdma_device *device, |
340 | struct ioat_chan_common *chan, int idx); | 337 | struct ioat_chan_common *chan, int idx); |
341 | enum dma_status ioat_is_dma_complete(struct dma_chan *c, dma_cookie_t cookie, | 338 | enum dma_status ioat_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie, |
342 | dma_cookie_t *done, dma_cookie_t *used); | 339 | struct dma_tx_state *txstate); |
343 | void ioat_dma_unmap(struct ioat_chan_common *chan, enum dma_ctrl_flags flags, | 340 | void ioat_dma_unmap(struct ioat_chan_common *chan, enum dma_ctrl_flags flags, |
344 | size_t len, struct ioat_dma_descriptor *hw); | 341 | size_t len, struct ioat_dma_descriptor *hw); |
345 | bool ioat_cleanup_preamble(struct ioat_chan_common *chan, | 342 | bool ioat_cleanup_preamble(struct ioat_chan_common *chan, |