Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
"A few fixes in pl330 and imx-sdma drivers."

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
DMA: PL330: Fix racy mutex unlock
DMA: PL330: Add missing static storage class specifier
dma: imx-sdma: buf_tail should be initialize in prepare function
dmaengine: pl330: dont complete descriptor for cyclic dma

+16 -20
+4 -2
drivers/dma/imx-sdma.c
··· 815 815 816 816 init_completion(&sdmac->done); 817 817 818 - sdmac->buf_tail = 0; 819 - 820 818 return 0; 821 819 out: 822 820 ··· 925 927 926 928 sdmac->flags = 0; 927 929 930 + sdmac->buf_tail = 0; 931 + 928 932 dev_dbg(sdma->dev, "setting up %d entries for channel %d.\n", 929 933 sg_len, channel); 930 934 ··· 1026 1026 return NULL; 1027 1027 1028 1028 sdmac->status = DMA_IN_PROGRESS; 1029 + 1030 + sdmac->buf_tail = 0; 1029 1031 1030 1032 sdmac->flags |= IMX_DMA_SG_LOOP; 1031 1033 sdmac->direction = direction;
+12 -18
drivers/dma/pl330.c
··· 392 392 struct pl330_reqcfg *cfg; 393 393 /* Pointer to first xfer in the request. */ 394 394 struct pl330_xfer *x; 395 + /* Hook to attach to DMAC's list of reqs with due callback */ 396 + struct list_head rqd; 395 397 }; 396 398 397 399 /* ··· 463 461 /* Number of bytes taken to setup MC for the req */ 464 462 u32 mc_len; 465 463 struct pl330_req *r; 466 - /* Hook to attach to DMAC's list of reqs with due callback */ 467 - struct list_head rqd; 468 464 }; 469 465 470 466 /* ToBeDone for tasklet */ ··· 1683 1683 /* Returns 1 if state was updated, 0 otherwise */ 1684 1684 static int pl330_update(const struct pl330_info *pi) 1685 1685 { 1686 - struct _pl330_req *rqdone; 1686 + struct pl330_req *rqdone, *tmp; 1687 1687 struct pl330_dmac *pl330; 1688 1688 unsigned long flags; 1689 1689 void __iomem *regs; ··· 1750 1750 if (active == -1) /* Aborted */ 1751 1751 continue; 1752 1752 1753 - rqdone = &thrd->req[active]; 1753 + /* Detach the req */ 1754 + rqdone = thrd->req[active].r; 1755 + thrd->req[active].r = NULL; 1756 + 1754 1757 mark_free(thrd, active); 1755 1758 1756 1759 /* Get going again ASAP */ ··· 1765 1762 } 1766 1763 1767 1764 /* Now that we are in no hurry, do the callbacks */ 1768 - while (!list_empty(&pl330->req_done)) { 1769 - struct pl330_req *r; 1770 - 1771 - rqdone = container_of(pl330->req_done.next, 1772 - struct _pl330_req, rqd); 1773 - 1774 - list_del_init(&rqdone->rqd); 1775 - 1776 - /* Detach the req */ 1777 - r = rqdone->r; 1778 - rqdone->r = NULL; 1765 + list_for_each_entry_safe(rqdone, tmp, &pl330->req_done, rqd) { 1766 + list_del(&rqdone->rqd); 1779 1767 1780 1768 spin_unlock_irqrestore(&pl330->lock, flags); 1781 - _callback(r, PL330_ERR_NONE); 1769 + _callback(rqdone, PL330_ERR_NONE); 1782 1770 spin_lock_irqsave(&pl330->lock, flags); 1783 1771 } 1784 1772 ··· 2315 2321 /* Pick up ripe tomatoes */ 2316 2322 list_for_each_entry_safe(desc, _dt, &pch->work_list, node) 2317 2323 if (desc->status == DONE) { 2318 - if (pch->cyclic) 2324 + if (!pch->cyclic) 2319 2325 dma_cookie_complete(&desc->txd); 2320 2326 list_move_tail(&desc->node, &list); 2321 2327 } ··· 2533 2539 } 2534 2540 2535 2541 /* Returns the number of descriptors added to the DMAC pool */ 2536 - int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count) 2542 + static int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count) 2537 2543 { 2538 2544 struct dma_pl330_desc *desc; 2539 2545 unsigned long flags;