summaryrefslogtreecommitdiff
path: root/drivers/dma/plx_dma.c
AgeCommit message (Collapse)AuthorFilesLines
2021-10-26dmaengine: switch from 'pci_' to 'dma_' APIQing Wang1-8/+2
The wrappers in include/linux/pci-dma-compat.h should go away. pci_set_dma_mask()/pci_set_consistent_dma_mask() should be replaced with dma_set_mask()/dma_set_coherent_mask(), and use dma_set_mask_and_coherent() for both. Signed-off-by: Qing Wang <wangqing@vivo.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/1633663733-47199-7-git-send-email-wangqing@vivo.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-04-12dmaengine: plx_dma: add a missing put_device() on error pathDan Carpenter1-7/+11
Add a missing put_device(&pdev->dev) if the call to dma_async_device_register(dma); fails. Fixes: 905ca51e63be ("dmaengine: plx-dma: Introduce PLX DMA engine PCI driver skeleton") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/YFnq/0IQzixtAbC1@mwanda Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-09-18dmaengine: plx_dma: convert tasklets to use new tasklet_setup() APIAllen Pais1-4/+3
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Link: https://lore.kernel.org/r/20200831103542.305571-34-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-01-15dmaengine: plx-dma: Implement descriptor submissionLogan Gunthorpe1-0/+119
On prep, a spin lock is taken and the next entry in the circular buffer is filled. On submit, the valid bit is set in the hardware descriptor and the lock is released. The DMA engine is started (if it's not already running) when the client calls dma_async_issue_pending(). Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/20200103212021.2881-4-logang@deltatee.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-01-15dmaengine: plx-dma: Implement hardware initialization and cleanupLogan Gunthorpe1-0/+370
Allocate DMA coherent memory for the ring of DMA descriptors and program the appropriate hardware registers. A tasklet is created which is triggered on an interrupt to process all the finished requests. Additionally, any remaining descriptors are aborted when the hardware is removed or the resources freed. Use an RCU pointer to synchronize PCI device unbind. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/20200103212021.2881-3-logang@deltatee.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-01-15dmaengine: plx-dma: Introduce PLX DMA engine PCI driver skeletonLogan Gunthorpe1-0/+150
Some PLX Switches can expose DMA engines via extra PCI functions on the upstream port. Each function will have one DMA channel. This patch is just the core PCI driver skeleton and dma engine registration. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/20200103212021.2881-2-logang@deltatee.com Signed-off-by: Vinod Koul <vkoul@kernel.org>