linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Alan Mikhak <alan.mikhak@sifive.com>
Cc: <amurray@thegoodpenguin.co.uk>, <arnd@arndb.de>,
	Bjorn Helgaas <bhelgaas@google.com>, <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	<lorenzo.pieralisi@arm.com>
Subject: Re: [PATCH 1/5] PCI: endpoint: functions/pci-epf-test: Add DMA support to transfer data
Date: Wed, 4 Mar 2020 10:45:16 +0530	[thread overview]
Message-ID: <eb57e52a-be34-dd2c-3820-21fe7dc68185@ti.com> (raw)
In-Reply-To: <CABEDWGwejv-1h=pLt_o5n=Mct+6r9oQdQCLT7GZSMgBR2bDJHg@mail.gmail.com>

Hi Alan,

On 04/03/20 5:27 am, Alan Mikhak wrote:
> On Wed, Feb 26, 2020 at 9:39 AM Alan Mikhak <alan.mikhak@sifive.com> wrote:
>>
>> On Tue, Feb 25, 2020 at 9:27 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>>>
>>> Hi Alan,
>>>
>>> On 26/02/20 2:41 am, Alan Mikhak wrote:
>>>> @@ -380,6 +572,7 @@ static void pci_epf_test_unbind(struct pci_epf *epf)
>>>>         int bar;
>>>>
>>>>         cancel_delayed_work(&epf_test->cmd_handler);
>>>> +       pci_epf_clean_dma_chan(epf_test);
>>>>         pci_epc_stop(epc);
>>>>         for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
>>>>                 epf_bar = &epf->bar[bar];
>>>> @@ -550,6 +743,12 @@ static int pci_epf_test_bind(struct pci_epf *epf)
>>>>                 }
>>>>         }
>>>>
>>>> +       epf_test->dma_supported = true;
>>>> +
>>>> +       ret = pci_epf_init_dma_chan(epf_test);
>>>> +       if (ret)
>>>> +               epf_test->dma_supported = false;
>>>> +
>>>>         if (linkup_notifier) {
>>>>                 epf->nb.notifier_call = pci_epf_test_notifier;
>>>>                 pci_epc_register_notifier(epc, &epf->nb);
>>>>
>>>> Hi Kishon,
>>>>
>>>> Looking forward to building and trying this patch series on
>>>> a platform I work on.
> 
> Hi Kishon,
> 
> I applied this v1 patch series to kernel.org linux 5.6-rc3 and built for
> x86_64 Debian and riscv. I verified that when I execute the pcitest
> command on the x86_64 host with -d flag, the riscv endpoint performs
> the transfer by using an available dma channel.

Thank you for testing this.
I've posted a new version after renaming the function names to
pci_epf_test_init_dma_chan() and pci_epf_test_cleanup_dma_chan() [1]
Can you add your "Tested-by: " tag in that series so that Lorenzo can
pick it up?

Thanks
Kishon

[1] -> http://lore.kernel.org/r/20200303103752.13076-1-kishon@ti.com

> 
> Regards,
> Alan
> 
>>>>
>>>> Would you please point me to where I can find the patches
>>>> which add pci_epf_init_dma_chan() and pci_epf_clean_dma_chan()
>>>> to Linux PCI Endpoint Framework?
>>>
>>> I've added these functions in pci-epf-test itself instead of adding in
>>> the core files. I realized adding it in core files may not be helpful if
>>> the endpoint function decides to use more number of DMA channels etc.,
>>
>> Thanks Kishon,
>>
>> I now realize they are in [PATCH 1/5] of this series. May I suggest renaming
>> them to pci_epf_test_init_dma_chan() and pci_epf_test_cleanup_dma_chan()?
>> With just pci_epf in their name, I was looking for them in pci-epf-core.c.
>>
>> Regards,
>> Alan
>>
>>>
>>> Thanks
>>> Kishon

      reply	other threads:[~2020-03-04  5:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  9:11 [PATCH 0/5] PCI: functions/pci-epf-test: Add DMA data transfer Kishon Vijay Abraham I
2020-02-25  9:11 ` [PATCH 1/5] PCI: endpoint: functions/pci-epf-test: Add DMA support to transfer data Kishon Vijay Abraham I
2020-02-25  9:11 ` [PATCH 2/5] PCI: endpoint: functions/pci-epf-test: Print throughput information Kishon Vijay Abraham I
2020-02-25  9:11 ` [PATCH 3/5] misc: pci_endpoint_test: Use streaming DMA APIs for buffer allocation Kishon Vijay Abraham I
2020-02-25  9:11 ` [PATCH 4/5] tools: PCI: Add 'd' command line option to support DMA Kishon Vijay Abraham I
2020-02-25  9:11 ` [PATCH 5/5] misc: pci_endpoint_test: Add support to get DMA option from userspace Kishon Vijay Abraham I
2020-02-25 21:11 ` [PATCH 1/5] PCI: endpoint: functions/pci-epf-test: Add DMA support to transfer data Alan Mikhak
2020-02-26  5:09   ` Kishon Vijay Abraham I
2020-02-26 17:39     ` Alan Mikhak
2020-03-03 23:57       ` Alan Mikhak
2020-03-04  5:15         ` Kishon Vijay Abraham I [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=eb57e52a-be34-dd2c-3820-21fe7dc68185@ti.com \
    --to=kishon@ti.com \
    --cc=alan.mikhak@sifive.com \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.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;
as well as URLs for NNTP newsgroup(s).