mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Frank.Li@oss.nxp.com, Jon Mason <jdmason@kudzu.us>,
	Allen Hubbe <allenbh@gmail.com>,
	"open list:NTB DRIVER CORE" <ntb@lists.linux.dev>,
	open list <linux-kernel@vger.kernel.org>
Cc: imx@lists.linux.dev, vkoul@kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH 1/1] NTB: ntb_transport: replace direct ->device_prep*() calls with standard DMA engine API
Date: Thu, 17 Sep 2026 13:12:49 -0700	[thread overview]
Message-ID: <ef1d2815-e284-4950-a485-792247588fb1@intel.com> (raw)
In-Reply-To: <20260917190831.1194795-1-Frank.Li@oss.nxp.com>



On 9/17/26 12:08 PM, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
> 
> 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 <Frank.Li@nxp.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  drivers/ntb/ntb_transport.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
> index f9caa1a653c5b..45144abfb7aad 100644
> --- a/drivers/ntb/ntb_transport.c
> +++ b/drivers/ntb/ntb_transport.c
> @@ -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;
>  


      reply	other threads:[~2026-09-17 20:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 19:08 Frank.Li
2026-09-17 20:12 ` Dave Jiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef1d2815-e284-4950-a485-792247588fb1@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.Li@oss.nxp.com \
    --cc=allenbh@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntb@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®