Skip to contentSkip to conversation

DMA: PL330: allow submitting 2 requests at a time

PATCH New Jassi Brar 2 participants 3 messages Feb 13, 2013 – Mar 4, 2013 dmaengine

lore
Share & tools
lore

Jassi Brar

author
#0 lore raw

PATCH 1/1 DMA: PL330: allow submitting 2 requests at a time

Fix the logic to allow mc programming of second transfer after first has been done, by removing immediate return upon success and iterating until we detect QFull or DMAC dying.

---
 drivers/dma/pl330.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/pl330.c +1 -2
index 80680ee..c1a867e 100644
@@ -2282,13 +2282,12 @@ static inline void fill_queue(struct dma_pl330_chan *pch)
 
 		/* If already submitted */
 		if (desc->status == BUSY)
-			break;
+			continue;
 
 		ret = pl330_submit_req(pch->pl330_chid,
 						&desc->req);
 		if (!ret) {
 			desc->status = BUSY;
-			break;
 		} else if (ret == -EAGAIN) {
 			/* QFull or DMAC Dying */
 			break;
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 DMA: PL330: allow submitting 2 requests at a time

Quoted 3 lines · Jassi Brar

Fix the logic to allow mc programming of second transfer after first has been done, by removing immediate return upon success and iterating until we detect QFull or DMAC dying.

This is a fix, should be sent to stable too?

--
~Vinod

Quoted 30 lines
---
 drivers/dma/pl330.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/pl330.c +1 -2
index 80680ee..c1a867e 100644
@@ -2282,13 +2282,12 @@ static inline void fill_queue(struct dma_pl330_chan *pch)
 
 		/* If already submitted */
 		if (desc->status == BUSY)
-			break;
+			continue;
 
 		ret = pl330_submit_req(pch->pl330_chid,
 						&desc->req);
 		if (!ret) {
 			desc->status = BUSY;
-			break;
 		} else if (ret == -EAGAIN) {
 			/* QFull or DMAC Dying */
 			break;
Signature · 1 line
1.7.10.4
Applied
#2 lore raw

PATCH 1/1 DMA: PL330: allow submitting 2 requests at a time

In reply to Jassi Brar
Quoted 7 lines · Jassi Brar

Fix the logic to allow mc programming of second transfer after first has been done, by removing immediate return upon success and iterating until we detect QFull or DMAC dying.

Applied, thanks

Quoted 26 lines
---
 drivers/dma/pl330.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/pl330.c +1 -2
index 80680ee..c1a867e 100644
@@ -2282,13 +2282,12 @@ static inline void fill_queue(struct dma_pl330_chan *pch)
 
 		/* If already submitted */
 		if (desc->status == BUSY)
-			break;
+			continue;
 
 		ret = pl330_submit_req(pch->pl330_chid,
 						&desc->req);
 		if (!ret) {
 			desc->status = BUSY;
-			break;
 		} else if (ret == -EAGAIN) {
 			/* QFull or DMAC Dying */
 			break;
Signature · 1 line
1.7.10.4