aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r--drivers/dma/ioat/dma_v2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
index f4a51d4d0349..5d65f8377971 100644
--- a/drivers/dma/ioat/dma_v2.c
+++ b/drivers/dma/ioat/dma_v2.c
@@ -508,6 +508,7 @@ int ioat2_alloc_chan_resources(struct dma_chan *c)
508 struct ioat_ring_ent **ring; 508 struct ioat_ring_ent **ring;
509 u64 status; 509 u64 status;
510 int order; 510 int order;
511 int i = 0;
511 512
512 /* have we already been set up? */ 513 /* have we already been set up? */
513 if (ioat->ring) 514 if (ioat->ring)
@@ -548,8 +549,11 @@ int ioat2_alloc_chan_resources(struct dma_chan *c)
548 ioat2_start_null_desc(ioat); 549 ioat2_start_null_desc(ioat);
549 550
550 /* check that we got off the ground */ 551 /* check that we got off the ground */
551 udelay(5); 552 do {
552 status = ioat_chansts(chan); 553 udelay(1);
554 status = ioat_chansts(chan);
555 } while (i++ < 20 && !is_ioat_active(status) && !is_ioat_idle(status));
556
553 if (is_ioat_active(status) || is_ioat_idle(status)) { 557 if (is_ioat_active(status) || is_ioat_idle(status)) {
554 set_bit(IOAT_RUN, &chan->state); 558 set_bit(IOAT_RUN, &chan->state);
555 return 1 << ioat->alloc_order; 559 return 1 << ioat->alloc_order;