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

Merge tag 'dmaengine-fix-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:

- HAS_IOMEM fixes for fsl edma and intel idma

- return-value fix, interrupt vector setting and typo fix for xilinx
xdma

- email updates for codeaurora email domain move

- correct pause status for pl330 driver

- idxd clear flag on disable fix

- function documentation fix for owl dma

- potential un-allocated memory fix for mcf driver

* tag 'dmaengine-fix-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
dmaengine: xilinx: xdma: Fix typo
dmaengine: xilinx: xdma: Fix interrupt vector setting
dmaengine: owl-dma: Modify mismatched function name
dmaengine: idxd: Clear PRS disable flag when disabling IDXD device
dmaengine: pl330: Return DMA_PAUSED when transaction is paused
dmaengine: qcom_hidma: Update codeaurora email domain
dmaengine: mcf-edma: Fix a potential un-allocated memory access
dmaengine: xilinx: xdma: Fix Judgment of the return value
idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM

+42 -25
+1 -1
Documentation/ABI/testing/sysfs-platform-hidma
··· 2 2 /sys/devices/platform/QCOM8061:*/chid 3 3 Date: Dec 2015 4 4 KernelVersion: 4.4 5 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 5 + Contact: "Sinan Kaya <okaya@kernel.org>" 6 6 Description: 7 7 Contains the ID of the channel within the HIDMA instance. 8 8 It is used to associate a given HIDMA channel with the
+10 -10
Documentation/ABI/testing/sysfs-platform-hidma-mgmt
··· 2 2 /sys/devices/platform/QCOM8060:*/chanops/chan*/priority 3 3 Date: Nov 2015 4 4 KernelVersion: 4.4 5 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 5 + Contact: "Sinan Kaya <okaya@kernel.org>" 6 6 Description: 7 7 Contains either 0 or 1 and indicates if the DMA channel is a 8 8 low priority (0) or high priority (1) channel. ··· 11 11 /sys/devices/platform/QCOM8060:*/chanops/chan*/weight 12 12 Date: Nov 2015 13 13 KernelVersion: 4.4 14 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 14 + Contact: "Sinan Kaya <okaya@kernel.org>" 15 15 Description: 16 16 Contains 0..15 and indicates the weight of the channel among 17 17 equal priority channels during round robin scheduling. ··· 20 20 /sys/devices/platform/QCOM8060:*/chreset_timeout_cycles 21 21 Date: Nov 2015 22 22 KernelVersion: 4.4 23 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 23 + Contact: "Sinan Kaya <okaya@kernel.org>" 24 24 Description: 25 25 Contains the platform specific cycle value to wait after a 26 26 reset command is issued. If the value is chosen too short, ··· 32 32 /sys/devices/platform/QCOM8060:*/dma_channels 33 33 Date: Nov 2015 34 34 KernelVersion: 4.4 35 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 35 + Contact: "Sinan Kaya <okaya@kernel.org>" 36 36 Description: 37 37 Contains the number of dma channels supported by one instance 38 38 of HIDMA hardware. The value may change from chip to chip. ··· 41 41 /sys/devices/platform/QCOM8060:*/hw_version_major 42 42 Date: Nov 2015 43 43 KernelVersion: 4.4 44 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 44 + Contact: "Sinan Kaya <okaya@kernel.org>" 45 45 Description: 46 46 Version number major for the hardware. 47 47 ··· 49 49 /sys/devices/platform/QCOM8060:*/hw_version_minor 50 50 Date: Nov 2015 51 51 KernelVersion: 4.4 52 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 52 + Contact: "Sinan Kaya <okaya@kernel.org>" 53 53 Description: 54 54 Version number minor for the hardware. 55 55 ··· 57 57 /sys/devices/platform/QCOM8060:*/max_rd_xactions 58 58 Date: Nov 2015 59 59 KernelVersion: 4.4 60 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 60 + Contact: "Sinan Kaya <okaya@kernel.org>" 61 61 Description: 62 62 Contains a value between 0 and 31. Maximum number of 63 63 read transactions that can be issued back to back. ··· 69 69 /sys/devices/platform/QCOM8060:*/max_read_request 70 70 Date: Nov 2015 71 71 KernelVersion: 4.4 72 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 72 + Contact: "Sinan Kaya <okaya@kernel.org>" 73 73 Description: 74 74 Size of each read request. The value needs to be a power 75 75 of two and can be between 128 and 1024. ··· 78 78 /sys/devices/platform/QCOM8060:*/max_wr_xactions 79 79 Date: Nov 2015 80 80 KernelVersion: 4.4 81 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 81 + Contact: "Sinan Kaya <okaya@kernel.org>" 82 82 Description: 83 83 Contains a value between 0 and 31. Maximum number of 84 84 write transactions that can be issued back to back. ··· 91 91 /sys/devices/platform/QCOM8060:*/max_write_request 92 92 Date: Nov 2015 93 93 KernelVersion: 4.4 94 - Contact: "Sinan Kaya <okaya@codeaurora.org>" 94 + Contact: "Sinan Kaya <okaya@kernel.org>" 95 95 Description: 96 96 Size of each write request. The value needs to be a power 97 97 of two and can be between 128 and 1024.
+2
drivers/dma/Kconfig
··· 211 211 config FSL_EDMA 212 212 tristate "Freescale eDMA engine support" 213 213 depends on OF 214 + depends on HAS_IOMEM 214 215 select DMA_ENGINE 215 216 select DMA_VIRTUAL_CHANNELS 216 217 help ··· 281 280 282 281 config INTEL_IDMA64 283 282 tristate "Intel integrated DMA 64-bit support" 283 + depends on HAS_IOMEM 284 284 select DMA_ENGINE 285 285 select DMA_VIRTUAL_CHANNELS 286 286 help
+1 -3
drivers/dma/idxd/device.c
··· 384 384 wq->threshold = 0; 385 385 wq->priority = 0; 386 386 wq->enqcmds_retries = IDXD_ENQCMDS_RETRIES; 387 - clear_bit(WQ_FLAG_DEDICATED, &wq->flags); 388 - clear_bit(WQ_FLAG_BLOCK_ON_FAULT, &wq->flags); 389 - clear_bit(WQ_FLAG_ATS_DISABLE, &wq->flags); 387 + wq->flags = 0; 390 388 memset(wq->name, 0, WQ_NAME_SIZE); 391 389 wq->max_xfer_bytes = WQ_DEFAULT_MAX_XFER; 392 390 idxd_wq_set_max_batch_size(idxd->data->type, wq, WQ_DEFAULT_MAX_BATCH);
+7 -6
drivers/dma/mcf-edma.c
··· 190 190 return -EINVAL; 191 191 } 192 192 193 - chans = pdata->dma_channels; 193 + if (!pdata->dma_channels) { 194 + dev_info(&pdev->dev, "setting default channel number to 64"); 195 + chans = 64; 196 + } else { 197 + chans = pdata->dma_channels; 198 + } 199 + 194 200 len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans; 195 201 mcf_edma = devm_kzalloc(&pdev->dev, len, GFP_KERNEL); 196 202 if (!mcf_edma) ··· 207 201 /* Set up drvdata for ColdFire edma */ 208 202 mcf_edma->drvdata = &mcf_data; 209 203 mcf_edma->big_endian = 1; 210 - 211 - if (!mcf_edma->n_chans) { 212 - dev_info(&pdev->dev, "setting default channel number to 64"); 213 - mcf_edma->n_chans = 64; 214 - } 215 204 216 205 mutex_init(&mcf_edma->fsl_edma_mutex); 217 206
+1 -1
drivers/dma/owl-dma.c
··· 192 192 }; 193 193 194 194 /** 195 - * struct owl_dma_pchan - Wrapper for DMA ENGINE channel 195 + * struct owl_dma_vchan - Wrapper for DMA ENGINE channel 196 196 * @vc: wrapped virtual channel 197 197 * @pchan: the physical channel utilized by this channel 198 198 * @txd: active transaction on this channel
+16 -2
drivers/dma/pl330.c
··· 404 404 */ 405 405 BUSY, 406 406 /* 407 + * Pause was called while descriptor was BUSY. Due to hardware 408 + * limitations, only termination is possible for descriptors 409 + * that have been paused. 410 + */ 411 + PAUSED, 412 + /* 407 413 * Sitting on the channel work_list but xfer done 408 414 * by PL330 core 409 415 */ ··· 2047 2041 list_for_each_entry(desc, &pch->work_list, node) { 2048 2042 2049 2043 /* If already submitted */ 2050 - if (desc->status == BUSY) 2044 + if (desc->status == BUSY || desc->status == PAUSED) 2051 2045 continue; 2052 2046 2053 2047 ret = pl330_submit_req(pch->thread, desc); ··· 2332 2326 { 2333 2327 struct dma_pl330_chan *pch = to_pchan(chan); 2334 2328 struct pl330_dmac *pl330 = pch->dmac; 2329 + struct dma_pl330_desc *desc; 2335 2330 unsigned long flags; 2336 2331 2337 2332 pm_runtime_get_sync(pl330->ddma.dev); ··· 2342 2335 _stop(pch->thread); 2343 2336 spin_unlock(&pl330->lock); 2344 2337 2338 + list_for_each_entry(desc, &pch->work_list, node) { 2339 + if (desc->status == BUSY) 2340 + desc->status = PAUSED; 2341 + } 2345 2342 spin_unlock_irqrestore(&pch->lock, flags); 2346 2343 pm_runtime_mark_last_busy(pl330->ddma.dev); 2347 2344 pm_runtime_put_autosuspend(pl330->ddma.dev); ··· 2436 2425 else if (running && desc == running) 2437 2426 transferred = 2438 2427 pl330_get_current_xferred_count(pch, desc); 2439 - else if (desc->status == BUSY) 2428 + else if (desc->status == BUSY || desc->status == PAUSED) 2440 2429 /* 2441 2430 * Busy but not running means either just enqueued, 2442 2431 * or finished and not yet marked done ··· 2452 2441 switch (desc->status) { 2453 2442 case DONE: 2454 2443 ret = DMA_COMPLETE; 2444 + break; 2445 + case PAUSED: 2446 + ret = DMA_PAUSED; 2455 2447 break; 2456 2448 case PREP: 2457 2449 case BUSY:
+4 -2
drivers/dma/xilinx/xdma.c
··· 668 668 val |= irq_start << shift; 669 669 irq_start++; 670 670 irq_num--; 671 + if (!irq_num) 672 + break; 671 673 } 672 674 673 675 /* write IRQ register */ ··· 717 715 ret = request_irq(irq, xdma_channel_isr, 0, 718 716 "xdma-c2h-channel", &xdev->c2h_chans[j]); 719 717 if (ret) { 720 - xdma_err(xdev, "H2C channel%d request irq%d failed: %d", 718 + xdma_err(xdev, "C2H channel%d request irq%d failed: %d", 721 719 j, irq, ret); 722 720 goto failed_init_c2h; 723 721 } ··· 894 892 } 895 893 896 894 reg_base = devm_ioremap_resource(&pdev->dev, res); 897 - if (!reg_base) { 895 + if (IS_ERR(reg_base)) { 898 896 xdma_err(xdev, "ioremap failed"); 899 897 goto failed; 900 898 }