From: "Gupta, Suraj" <suraj.gupta2@amd.com>
To: Frank.Li@oss.nxp.com, Matt Porter <mporter@kernel.crashing.org>,
Alexandre Bounine <alex.bou9@gmail.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Michal Simek <michal.simek@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Chunyan Zhang <zhang.lyra@gmail.com>
Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sound@vger.kernel.org, imx@lists.linux.dev,
Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH 2/3] net: xilinx: axienet: use dmaengine_prep_slave_sg_context()
Date: Mon, 9 Nov 2026 13:03:29 +0530 [thread overview]
Message-ID: <057778fb-e2da-4edf-aace-5ff96ae386ba@amd.com> (raw)
In-Reply-To: <20261106-rio_sg-v1-2-bc54b4bd8c95@nxp.com>
On 11/7/2026 4:13 AM, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
>
> Replace the direct call to dma_dev->device_prep_slave_sg() with the
> dmaengine_prep_slave_sg_context() helper, which handles NULL checks and
> passes the context pointer cleanly.
>
> No functional change. Prepare to make struct dma_device private to the DMA
> engine.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Suggest go through DMA engine tree. this is only one of 3 user, which
> use context at prep sg.
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 7e83c4b5f1931..55d1b39caf7ed 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1006,9 +1006,10 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev)
> app_metadata[0] |= 2; /* Tx Full Checksum Offload Enabled */
> }
>
> - dma_tx_desc = dma_dev->device_prep_slave_sg(lp->tx_chan, skbuf_dma->sgl,
> - sg_len, DMA_MEM_TO_DEV,
> - DMA_PREP_INTERRUPT, (void *)app_metadata);
> + dma_tx_desc = dmaengine_prep_slave_sg_context(lp->tx_chan, skbuf_dma->sgl,
> + sg_len, DMA_MEM_TO_DEV,
> + DMA_PREP_INTERRUPT,
> + (void *)app_metadata);
After this change, dma_dev looks unused & can be removed. Shashiko bot
also pointed same.
Thanks,
Suraj
> if (!dma_tx_desc)
> goto xmit_error_unmap_sg;
>
>
next prev parent reply other threads:[~2026-11-09 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 22:43 [PATCH 0/3] dmaengine: generalize dmaengine_prep_rio_sg() as dmaengine_prep_slave_sg_context() Frank.Li
2026-11-06 22:43 ` [PATCH 1/3] dmaengine/rio: rename dmaengine_prep_rio_sg() to dmaengine_prep_slave_sg_context() Frank.Li
2026-11-06 22:43 ` [PATCH 2/3] net: xilinx: axienet: use dmaengine_prep_slave_sg_context() Frank.Li
2026-11-09 7:33 ` Gupta, Suraj [this message]
2026-11-06 22:43 ` [PATCH 3/3] ASoC: sprd: use dmaengine_prep_slave_sg_context() instead of device_prep_slave_sg() Frank.Li
2026-11-07 10:59 ` Mark Brown
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=057778fb-e2da-4edf-aace-5ff96ae386ba@amd.com \
--to=suraj.gupta2@amd.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=Frank.Li@oss.nxp.com \
--cc=alex.bou9@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=baolin.wang@linux.alibaba.com \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=mporter@kernel.crashing.org \
--cc=netdev@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=pabeni@redhat.com \
--cc=perex@perex.cz \
--cc=radhey.shyam.pandey@amd.com \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
--cc=zhang.lyra@gmail.com \
/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®