linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Zhi Li <lznuaa@gmail.com>
Cc: "Frank Li" <Frank.Li@nxp.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	hongxing.zhu@nxp.com, "Lucas Stach" <l.stach@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	linux-pci@vger.kernel.org, dmaengine@vger.kernel.org,
	"Serge Semin" <fancer.lancer@gmail.com>,
	"Kishon Vijay Abraham I" <kishon@ti.com>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Serge Semin" <Sergey.Semin@baikalelectronics.ru>
Subject: Re: [PATCH v11 8/8] PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities
Date: Mon, 23 May 2022 17:18:42 -0500	[thread overview]
Message-ID: <20220523221842.GA221538@bhelgaas> (raw)
In-Reply-To: <CAHrpEqSuojypCKdueN-G9c=GQ0zHnPqLb3S6e28V8cchA=qyfA@mail.gmail.com>

On Mon, May 23, 2022 at 02:19:34PM -0500, Zhi Li wrote:

> Bjorn:  Are you satisfied with the below message?  I will fix the
> other code in the next version.

Looks good, minor questions and tweaks below:

> Some PCI Endpoint controllers integrate an eDMA (embedded DMA).
> The eDMA controller issues a single bus command per data transfer.

Still not sure why this sentence is here.  Is it something the patch
relies on?  Why does it matter how many bus commands there are?

> eDMA can bypass the outbound memory address translation unit to
> access all RC memory space.
> 
> Add eDMA support for pci-epf-test.
> 
> EPF test can use, depending on HW availability, eDMA or general system
> DMA controllers to perform DMA. The test probes the EPF DMA channel
> capabilities.

  Depending on HW availability, the EPF test can use either eDMA or
  general system DMA controllers to perform DMA. The test tries to use
  eDMA first and falls back to general system DMA controllers if
  there's no eDMA.

> Separate dma_chan to dma_chan_tx and dma_chan_rx. Search eDMA channel
> firstly, then search memory to memory DMA channel if eDMA does not exist.
> If general memory to memory channels are used, dma_chan_rx = dma_chan_tx.

  Search for an eDMA channel first, then search for a memory-to-memory
  DMA channel ...

> Add dma_addr_t dma_remote in pci_epf_test_data_transfer()
> because eDMA uses remote RC physical address directly.
> 
> Add enum dma_transfer_direction dir in pci_epf_test_data_transfer()
> because eDMA chooses the correct RX/TX channel by dir.
> 
> The overall steps are
> 
> 1. Execute dma_request_channel() and filter function to find correct
> eDMA RX and TX Channel. If a channel does not exist, fallback to try to
> allocate general memory to memory DMA channel.
> 2. Execute dmaengine_slave_config() to configure remote side physical
> address.
> 3. Execute dmaengine_prep_slave_single() to create transfer descriptor.
> 4. Execute tx_submit().
> 5. Execute dma_async_issue_pending()

  reply	other threads:[~2022-05-23 22:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 15:19 [PATCH v11 0/8] Enable designware PCI EP EDMA locally Frank Li
2022-05-17 15:19 ` [PATCH v11 1/8] dmaengine: dw-edma: Remove unused field irq in struct dw_edma_chip Frank Li
2022-05-17 15:19 ` [PATCH v11 2/8] dmaengine: dw-edma: Detach the private data and chip info structures Frank Li
2022-05-17 15:19 ` [PATCH v11 3/8] dmaengine: dw-edma: Change rg_region to reg_base in struct dw_edma_chip Frank Li
2022-05-17 15:19 ` [PATCH v11 4/8] dmaengine: dw-edma: Rename wr(rd)_ch_cnt to ll_wr(rd)_cnt " Frank Li
2022-05-17 15:19 ` [PATCH v11 5/8] dmaengine: dw-edma: Drop dma_slave_config.direction field usage Frank Li
2022-05-17 15:19 ` [PATCH v11 6/8] dmaengine: dw-edma: Fix eDMA Rd/Wr-channels and DMA-direction semantics Frank Li
2022-05-17 15:19 ` [PATCH v11 7/8] dmaengine: dw-edma: Add support for chip specific flags Frank Li
2022-05-17 15:19 ` [PATCH v11 8/8] PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities Frank Li
2022-05-23 18:22   ` Bjorn Helgaas
2022-05-23 19:19     ` Zhi Li
2022-05-23 22:18       ` Bjorn Helgaas [this message]
2022-05-24  1:54         ` Zhi Li
2022-05-24  5:09   ` Kishon Vijay Abraham I
2022-05-23 11:06 ` [PATCH v11 0/8] Enable designware PCI EP EDMA locally Serge Semin
2022-05-23 18:02   ` Bjorn Helgaas
2022-05-23 18:41     ` Zhi Li
2022-05-23 22:12       ` Bjorn Helgaas
2022-05-24  5:48         ` Serge Semin
2022-05-24 15:52           ` Bjorn Helgaas
2022-05-25  9:07             ` Serge Semin
2022-06-15 13:46               ` Zhi Li

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=20220523221842.GA221538@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=bhelgaas@google.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lznuaa@gmail.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).