Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev
@ 2026-11-03 22:05 Frank.Li
  2026-11-03 22:07 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-11-03 22:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Frank Li, open list:USB SUBSYSTEM, open list
  Cc: imx, vkoul

From: Frank Li <Frank.Li@nxp.com>

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
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
change in v2
- Update subject
- v1 https://lore.kernel.org/all/20260917205625.1299375-1-Frank.Li@oss.nxp.com/
---
 drivers/usb/renesas_usbhs/fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index bac6f8fd0055e..d6fa436112aba 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -810,7 +810,7 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
 	struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
 	struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
 
-	return info->dma_map_ctrl(chan->device->dev, pkt, map);
+	return info->dma_map_ctrl(dmaengine_get_dma_device(chan), pkt, map);
 }
 
 static void usbhsf_dma_complete(void *arg,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev
  2026-11-03 22:05 [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev Frank.Li
@ 2026-11-03 22:07 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-03 22:07 UTC (permalink / raw)
  To: Frank.Li, open list:USB SUBSYSTEM

> From: Frank Li <Frank.Li@nxp.com>
> 
> 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
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103220538.1836027-1-Frank.Li@oss.nxp.com?part=1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-03 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 22:05 [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev Frank.Li
2026-11-03 22:07 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox