NTB: ntb_transport: replace direct ->device_prep*() calls with standard DMA engine API
Subsystems (2)
PATCH 1/1 NTB: ntb_transport: replace direct ->device_prep*() calls with standard DMA engine API
From: Frank Li <[email protected]>
DMA engine consumers must not call the channel's device_prep_*() function pointers directly. Use the standard dmaengine wrapper APIs instead.
Assisted-by LLM
Signed-off-by Frank Li <[email protected]>
--- drivers/ntb/ntb_transport.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/ntb/ntb_transport.c +5 -5
@@ -1551,9 +1551,9 @@ static int ntb_async_rx_submit(struct ntb_queue_entry *entry, void *offset) unmap->from_cnt =1 ; - txd = device->device_prep_dma_memcpy (chan, unmap->addr[1 ], - unmap->addr[0 ], len, -DMA_PREP_INTERRUPT ); + txd =dmaengine_prep_dma_memcpy (chan, unmap->addr[1 ], + unmap->addr[0 ], len, +DMA_PREP_INTERRUPT );if (!txd) goto err_get_unmap;
@@ -1884,8 +1884,8 @@ static int ntb_async_tx_submit(struct ntb_transport_qp *qp, unmap->to_cnt =1 ; - txd = device->device_prep_dma_memcpy (chan, dest, unmap->addr[0 ], len, -DMA_PREP_INTERRUPT ); + txd =dmaengine_prep_dma_memcpy (chan, dest, unmap->addr[0 ], len, +DMA_PREP_INTERRUPT );if (!txd) goto err_get_unmap;
Signature · 1 line
2.43.0
Quoted 7 lines · On 9/17/26 12:08 PM, [email protected] wrote:
From: Frank Li <[email protected]>
DMA engine consumers must not call the channel's device_prep_*() function pointers directly. Use the standard dmaengine wrapper APIs instead.
Assisted-by LLMSigned-off-by Frank Li <[email protected]>
Reviewed-by Dave Jiang <[email protected]>
Quoted 32 lines
--- drivers/ntb/ntb_transport.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/ntb/ntb_transport.c +5
-5@@ -1551,9 +1551,9 @@ static int ntb_async_rx_submit(struct ntb_queue_entry *entry, void *offset) unmap->from_cnt =1 ; - txd = device->device_prep_dma_memcpy (chan, unmap->addr[1 ], - unmap->addr[0 ], len, -DMA_PREP_INTERRUPT ); + txd =dmaengine_prep_dma_memcpy (chan, unmap->addr[1 ], + unmap->addr[0 ], len, +DMA_PREP_INTERRUPT );if (!txd) goto err_get_unmap;@@ -1884,8 +1884,8 @@ static int ntb_async_tx_submit(struct ntb_transport_qp *qp, unmap->to_cnt =1 ; - txd = device->device_prep_dma_memcpy (chan, dest, unmap->addr[0 ], len, -DMA_PREP_INTERRUPT ); + txd =dmaengine_prep_dma_memcpy (chan, dest, unmap->addr[0 ], len, +DMA_PREP_INTERRUPT );if (!txd) goto err_get_unmap;