diff options
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, |