From: Subbaraya Sundeep <sbhatta@marvell.com>
To: "Gupta, Suraj" <Suraj.Gupta2@amd.com>
Cc: "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"Simek, Michal" <michal.simek@amd.com>,
"vkoul@kernel.org" <vkoul@kernel.org>,
"Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"Katakam, Harini" <harini.katakam@amd.com>
Subject: Re: [PATCH V2 2/4] dmaengine: xilinx_dma: Fix irq handler and start transfer path for AXI DMA
Date: Sat, 12 Jul 2025 05:36:12 +0000 [thread overview]
Message-ID: <aHH0TPFQmhGYZm21@94363b911d3e> (raw)
In-Reply-To: <BL3PR12MB657159BD5F7C2161D6B9A5AAC94BA@BL3PR12MB6571.namprd12.prod.outlook.com>
On 2025-07-11 at 20:13:40, Gupta, Suraj (Suraj.Gupta2@amd.com) wrote:
> [Public]
>
> > -----Original Message-----
> > From: Subbaraya Sundeep <sbhatta@marvell.com>
> > Sent: Friday, July 11, 2025 9:56 PM
> > To: Gupta, Suraj <Suraj.Gupta2@amd.com>
> > Cc: andrew+netdev@lunn.ch; davem@davemloft.net; kuba@kernel.org;
> > pabeni@redhat.com; Simek, Michal <michal.simek@amd.com>; vkoul@kernel.org;
> > Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
> > netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org; dmaengine@vger.kernel.org; Katakam, Harini
> > <harini.katakam@amd.com>
> > Subject: Re: [PATCH V2 2/4] dmaengine: xilinx_dma: Fix irq handler and start transfer
> > path for AXI DMA
> >
> > Caution: This message originated from an External Source. Use proper caution when
> > opening attachments, clicking links, or responding.
> >
> >
> > On 2025-07-10 at 10:12:27, Suraj Gupta (suraj.gupta2@amd.com) wrote:
> > > AXI DMA driver incorrectly assumes complete transfer completion upon
> > > IRQ reception, particularly problematic when IRQ coalescing is active.
> > > Updating the tail pointer dynamically fixes it.
> > > Remove existing idle state validation in the beginning of
> > > xilinx_dma_start_transfer() as it blocks valid transfer initiation on
> > > busy channels with queued descriptors.
> > > Additionally, refactor xilinx_dma_start_transfer() to consolidate
> > > coalesce and delay configurations while conditionally starting
> > > channels only when idle.
> > >
> > > Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> > > Fixes: Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx
> > > AXI Direct Memory Access Engine")
> >
> > You series looks like net-next material and this one is fixing some existing bug. Send
> > this one patch seperately to net.
> > Also include net or net-next in subject.
> >
> > Thanks,
> > Sundeep
>
> This series is more of DMAengine as we're enabling coalesce parameters configuration via DMAengine framework. AXI ethernet is just an example client using AXI DMA.
>
> I sent V1 as separate patches for net-next and dmaengine mailing list and got suggestion[1] to send them as single series for better review, so I didn't used net specific subject prefix.
> [1]: https://lore.kernel.org/all/d5be7218-8ec1-4208-ac24-94d4831bfdb6@linux.dev/
My bad I forgot AXI ethernet and DMA are different IPs.
Thanks,
Sundeep
>
> Regards,
> Suraj
>
> > > ---
> > > drivers/dma/xilinx/xilinx_dma.c | 20 ++++++++++----------
> > > 1 file changed, 10 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/drivers/dma/xilinx/xilinx_dma.c
> > > b/drivers/dma/xilinx/xilinx_dma.c index a34d8f0ceed8..187749b7b8a6
> > > 100644
> > > --- a/drivers/dma/xilinx/xilinx_dma.c
> > > +++ b/drivers/dma/xilinx/xilinx_dma.c
> > > @@ -1548,9 +1548,6 @@ static void xilinx_dma_start_transfer(struct
> > xilinx_dma_chan *chan)
> > > if (list_empty(&chan->pending_list))
> > > return;
> > >
> > > - if (!chan->idle)
> > > - return;
> > > -
> > > head_desc = list_first_entry(&chan->pending_list,
> > > struct xilinx_dma_tx_descriptor, node);
> > > tail_desc = list_last_entry(&chan->pending_list,
> > > @@ -1558,23 +1555,24 @@ static void xilinx_dma_start_transfer(struct
> > xilinx_dma_chan *chan)
> > > tail_segment = list_last_entry(&tail_desc->segments,
> > > struct xilinx_axidma_tx_segment,
> > > node);
> > >
> > > + if (chan->has_sg && list_empty(&chan->active_list))
> > > + xilinx_write(chan, XILINX_DMA_REG_CURDESC,
> > > + head_desc->async_tx.phys);
> > > +
> > > reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
> > >
> > > if (chan->desc_pendingcount <= XILINX_DMA_COALESCE_MAX) {
> > > reg &= ~XILINX_DMA_CR_COALESCE_MAX;
> > > reg |= chan->desc_pendingcount <<
> > > XILINX_DMA_CR_COALESCE_SHIFT;
> > > - dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
> > > }
> > >
> > > - if (chan->has_sg)
> > > - xilinx_write(chan, XILINX_DMA_REG_CURDESC,
> > > - head_desc->async_tx.phys);
> > > reg &= ~XILINX_DMA_CR_DELAY_MAX;
> > > reg |= chan->irq_delay << XILINX_DMA_CR_DELAY_SHIFT;
> > > dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
> > >
> > > - xilinx_dma_start(chan);
> > > + if (chan->idle)
> > > + xilinx_dma_start(chan);
> > >
> > > if (chan->err)
> > > return;
> > > @@ -1914,8 +1912,10 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void
> > *data)
> > > XILINX_DMA_DMASR_DLY_CNT_IRQ)) {
> > > spin_lock(&chan->lock);
> > > xilinx_dma_complete_descriptor(chan);
> > > - chan->idle = true;
> > > - chan->start_transfer(chan);
> > > + if (list_empty(&chan->active_list)) {
> > > + chan->idle = true;
> > > + chan->start_transfer(chan);
> > > + }
> > > spin_unlock(&chan->lock);
> > > }
> > >
> > > --
> > > 2.25.1
> > >
next prev parent reply other threads:[~2025-07-12 5:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 10:12 [PATCH V2 0/4] Add ethtool support to configure irq coalescing count and delay Suraj Gupta
2025-07-10 10:12 ` [PATCH V2 1/4] dmaengine: Add support to configure and read IRQ coalescing parameters Suraj Gupta
2025-07-23 7:30 ` Vinod Koul
2025-07-23 11:49 ` Gupta, Suraj
2025-08-25 6:17 ` Gupta, Suraj
2025-08-25 11:30 ` Vinod Koul
2025-07-10 10:12 ` [PATCH V2 2/4] dmaengine: xilinx_dma: Fix irq handler and start transfer path for AXI DMA Suraj Gupta
2025-07-10 11:26 ` Simon Horman
2025-07-11 5:32 ` Folker Schwesinger
2025-07-11 16:26 ` Subbaraya Sundeep
2025-07-11 20:13 ` Gupta, Suraj
2025-07-12 5:36 ` Subbaraya Sundeep [this message]
2025-07-15 11:05 ` Pandey, Radhey Shyam
2025-07-10 10:12 ` [PATCH V2 3/4] dmaengine: xilinx_dma: Add support to configure/report coalesce parameters from/to client using " Suraj Gupta
2025-07-10 10:12 ` [PATCH V2 4/4] net: xilinx: axienet: Add ethtool support to configure/report irq coalescing parameters in DMAengine flow Suraj Gupta
2025-07-11 16:33 ` Subbaraya Sundeep
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=aHH0TPFQmhGYZm21@94363b911d3e \
--to=sbhatta@marvell.com \
--cc=Suraj.Gupta2@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=harini.katakam@amd.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.