You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine updates from Vinod Koul: "This is fairly big pull by my standards as I had missed last merge window. So we have the support for device tree for slave-dmaengine, large updates to dw_dmac driver from Andy for reusing on different architectures. Along with this we have fixes on bunch of the drivers" Fix up trivial conflicts, usually due to #include line movement next to each other. * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (111 commits) Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT" ARM: dts: pl330: Add #dma-cells for generic dma binding support DMA: PL330: Register the DMA controller with the generic DMA helpers DMA: PL330: Add xlate function DMA: PL330: Add new pl330 filter for DT case. dma: tegra20-apb-dma: remove unnecessary assignment edma: do not waste memory for dma_mask dma: coh901318: set residue only if dma is in progress dma: coh901318: avoid unbalanced locking dmaengine.h: remove redundant else keyword dma: of-dma: protect list write operation by spin_lock dmaengine: ste_dma40: do not remove descriptors for cyclic transfers dma: of-dma.c: fix memory leakage dw_dmac: apply default dma_mask if needed dmaengine: ioat - fix spare sparse complain dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c ioatdma: fix race between updating ioat->head and IOAT_COMPLETION_PENDING dw_dmac: add support for Lynxpoint DMA controllers dw_dmac: return proper residue value dw_dmac: fill individual length of descriptor ...
This commit is contained in:
@@ -573,23 +573,22 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
|
||||
dma_dev = chan->device;
|
||||
dma_addr = dma_map_single(dma_dev->dev, buffer, len, direction);
|
||||
|
||||
flags |= DMA_COMPL_SKIP_SRC_UNMAP | DMA_COMPL_SKIP_DEST_UNMAP;
|
||||
|
||||
if (direction == DMA_TO_DEVICE) {
|
||||
dma_src = dma_addr;
|
||||
dma_dst = host->data_pa;
|
||||
flags |= DMA_COMPL_SRC_UNMAP_SINGLE | DMA_COMPL_SKIP_DEST_UNMAP;
|
||||
} else {
|
||||
dma_src = host->data_pa;
|
||||
dma_dst = dma_addr;
|
||||
flags |= DMA_COMPL_DEST_UNMAP_SINGLE | DMA_COMPL_SKIP_SRC_UNMAP;
|
||||
}
|
||||
|
||||
tx = dma_dev->device_prep_dma_memcpy(chan, dma_dst, dma_src,
|
||||
len, flags);
|
||||
|
||||
if (!tx) {
|
||||
dev_err(host->dev, "device_prep_dma_memcpy error\n");
|
||||
dma_unmap_single(dma_dev->dev, dma_addr, len, direction);
|
||||
return -EIO;
|
||||
ret = -EIO;
|
||||
goto unmap_dma;
|
||||
}
|
||||
|
||||
tx->callback = dma_complete;
|
||||
@@ -599,7 +598,7 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
|
||||
ret = dma_submit_error(cookie);
|
||||
if (ret) {
|
||||
dev_err(host->dev, "dma_submit_error %d\n", cookie);
|
||||
return ret;
|
||||
goto unmap_dma;
|
||||
}
|
||||
|
||||
dma_async_issue_pending(chan);
|
||||
@@ -610,10 +609,17 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
|
||||
if (ret <= 0) {
|
||||
chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
|
||||
dev_err(host->dev, "wait_for_completion_timeout\n");
|
||||
return ret ? ret : -ETIMEDOUT;
|
||||
if (!ret)
|
||||
ret = -ETIMEDOUT;
|
||||
goto unmap_dma;
|
||||
}
|
||||
|
||||
return 0;
|
||||
ret = 0;
|
||||
|
||||
unmap_dma:
|
||||
dma_unmap_single(dma_dev->dev, dma_addr, len, direction);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user