diff options
author | Fancy Fang <chen.fang@nxp.com> | 2016-03-22 10:52:27 +0800 |
---|---|---|
committer | Fancy Fang <chen.fang@nxp.com> | 2016-05-19 14:55:00 +0800 |
commit | 5db98a4109ac40418b9bb825fd2bbe916a80de20 (patch) | |
tree | 8a47aef6d66b5ed934028db3a1d0c4a419c89854 /drivers | |
parent | e6ea96a8fc8176dbb83484cfedef1ec04daa4ca4 (diff) |
MLK-12420 fix potential head list corruption.
The head list may be corrupted when two requests from
the same 'pxp_chan' are issued sequentially. So change
the issue_pending function to strictly serialized the
requests to avoid this kind of issue.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 3ed71dcdd8ceeb3725399053f31c1930d2e7a08d)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/pxp/pxp_dma_v3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c index f44045084958..4857c20dd443 100644 --- a/drivers/dma/pxp/pxp_dma_v3.c +++ b/drivers/dma/pxp/pxp_dma_v3.c @@ -1809,6 +1809,8 @@ static void pxp_issue_pending(struct dma_chan *chan) struct pxps *pxp = to_pxp(pxp_dma); unsigned long flags0, flags; + down(&pxp->sema); + spin_lock_irqsave(&pxp->lock, flags0); spin_lock_irqsave(&pxp_chan->lock, flags); @@ -1825,7 +1827,6 @@ static void pxp_issue_pending(struct dma_chan *chan) spin_unlock_irqrestore(&pxp->lock, flags0); pxp_clk_enable(pxp); - down(&pxp->sema); spin_lock_irqsave(&pxp->lock, flags); pxp->pxp_ongoing = 1; |