diff options
Diffstat (limited to 'drivers/dma/cppi41.c')
-rw-r--r-- | drivers/dma/cppi41.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index a58eec3b2cad..b743adf56465 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/delay.h> | ||
1 | #include <linux/dmaengine.h> | 2 | #include <linux/dmaengine.h> |
2 | #include <linux/dma-mapping.h> | 3 | #include <linux/dma-mapping.h> |
3 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
@@ -567,7 +568,7 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c) | |||
567 | reg |= GCR_TEARDOWN; | 568 | reg |= GCR_TEARDOWN; |
568 | cppi_writel(reg, c->gcr_reg); | 569 | cppi_writel(reg, c->gcr_reg); |
569 | c->td_queued = 1; | 570 | c->td_queued = 1; |
570 | c->td_retry = 100; | 571 | c->td_retry = 500; |
571 | } | 572 | } |
572 | 573 | ||
573 | if (!c->td_seen || !c->td_desc_seen) { | 574 | if (!c->td_seen || !c->td_desc_seen) { |
@@ -603,12 +604,16 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c) | |||
603 | * descriptor before the TD we fetch it from enqueue, it has to be | 604 | * descriptor before the TD we fetch it from enqueue, it has to be |
604 | * there waiting for us. | 605 | * there waiting for us. |
605 | */ | 606 | */ |
606 | if (!c->td_seen && c->td_retry) | 607 | if (!c->td_seen && c->td_retry) { |
608 | udelay(1); | ||
607 | return -EAGAIN; | 609 | return -EAGAIN; |
608 | 610 | } | |
609 | WARN_ON(!c->td_retry); | 611 | WARN_ON(!c->td_retry); |
612 | |||
610 | if (!c->td_desc_seen) { | 613 | if (!c->td_desc_seen) { |
611 | desc_phys = cppi41_pop_desc(cdd, c->q_num); | 614 | desc_phys = cppi41_pop_desc(cdd, c->q_num); |
615 | if (!desc_phys) | ||
616 | desc_phys = cppi41_pop_desc(cdd, c->q_comp_num); | ||
612 | WARN_ON(!desc_phys); | 617 | WARN_ON(!desc_phys); |
613 | } | 618 | } |
614 | 619 | ||
@@ -1088,7 +1093,6 @@ static struct platform_driver cpp41_dma_driver = { | |||
1088 | .remove = cppi41_dma_remove, | 1093 | .remove = cppi41_dma_remove, |
1089 | .driver = { | 1094 | .driver = { |
1090 | .name = "cppi41-dma-engine", | 1095 | .name = "cppi41-dma-engine", |
1091 | .owner = THIS_MODULE, | ||
1092 | .pm = &cppi41_pm_ops, | 1096 | .pm = &cppi41_pm_ops, |
1093 | .of_match_table = of_match_ptr(cppi41_dma_ids), | 1097 | .of_match_table = of_match_ptr(cppi41_dma_ids), |
1094 | }, | 1098 | }, |