Re: [PATCH v11 8/8] PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 23, 2022 at 5:18 PM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
>
> 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?

Okay, let me remove this line in the next version.

>
> > 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()



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux