aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ioat/dma_v2.c')
-rw-r--r--drivers/dma/ioat/dma_v2.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
index 6c1e6754d9bd..17ecacb70d40 100644
--- a/drivers/dma/ioat/dma_v2.c
+++ b/drivers/dma/ioat/dma_v2.c
@@ -400,13 +400,9 @@ static dma_cookie_t ioat2_tx_submit_unlock(struct dma_async_tx_descriptor *tx)
400 struct dma_chan *c = tx->chan; 400 struct dma_chan *c = tx->chan;
401 struct ioat2_dma_chan *ioat = to_ioat2_chan(c); 401 struct ioat2_dma_chan *ioat = to_ioat2_chan(c);
402 struct ioat_chan_common *chan = &ioat->base; 402 struct ioat_chan_common *chan = &ioat->base;
403 dma_cookie_t cookie = c->cookie; 403 dma_cookie_t cookie;
404 404
405 cookie++; 405 cookie = dma_cookie_assign(tx);
406 if (cookie < 0)
407 cookie = 1;
408 tx->cookie = cookie;
409 c->cookie = cookie;
410 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie); 406 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie);
411 407
412 if (!test_and_set_bit(IOAT_COMPLETION_PENDING, &chan->state)) 408 if (!test_and_set_bit(IOAT_COMPLETION_PENDING, &chan->state))