Skip to contentSkip to conversation

rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Oct 11

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled

     Subject: rapidio: use dmaengine_get_dma_device() instead of chan->device->dev

has been removed from the -mm tree. Its filename was
rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Frank Li <[email protected]>
Subject: rapidio: use dmaengine_get_dma_device() instead of chan->device->dev
Date: Thu, 17 Sep 2026 16:50:12 -0400

Replace direct dma_chan::device::dev access with the proper dmaengine_get_dma_device() for consumer API.

chan->device->dev is not always the device used for DMA mapping. Some DMA engines support per-channel IOMMU mappings, so different channels may use different DMA devices. dmaengine_get_dma_device() returns the correct device for each channel.

This also prepares for making the DMA engine provider data structures private. DMA consumers should not access DMA engine internals directly.

Assisted-by LLM
Cc Alexandre Bounine <[email protected]>
Cc Dan Carpenter <[email protected]>
Cc Kees Cook <[email protected]>
Cc Matt Porter <[email protected]>
Cc Vinod Koul <[email protected]>

---

 drivers/rapidio/devices/rio_mport_cdev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rapidio/devices/rio_mport_cdev.c renamed from drivers/rapidio/devices/rio_mport_cdev.c~rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev +2 -2
@@ -555,7 +555,7 @@ static void dma_req_free(struct kref *re
 			refcount);
 	struct mport_cdev_priv *priv = req->priv;
 
-	dma_unmap_sg(req->dmach->device->dev,
+	dma_unmap_sg(dmaengine_get_dma_device(req->dmach),
 		     req->sgt.sgl, req->sgt.nents, req->dir);
 	sg_free_table(&req->sgt);
 	if (req->page_list) {
@@ -916,7 +916,7 @@ rio_dma_transfer(struct file *filp, u32
 				xfer->offset, xfer->length);
 	}
 
-	nents = dma_map_sg(chan->device->dev,
+	nents = dma_map_sg(dmaengine_get_dma_device(chan),
 			   req->sgt.sgl, req->sgt.nents, dir);
 	if (nents == 0) {
 		rmcd_error("Failed to map SG list");

_

Patches currently in -mm which might be from [email protected] are