Re: [PATCH v3 4/6] PCI: endpoint: pci-epf-test: Add doorbell test support

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

 



On Mon, Oct 21, 2024 at 08:55:38AM +0200, Niklas Cassel wrote:
> On Sun, Oct 20, 2024 at 04:41:25PM +0200, Niklas Cassel wrote:
> > On Fri, Oct 18, 2024 at 11:13:34AM -0400, Frank Li wrote:
> > > On Fri, Oct 18, 2024 at 04:01:05PM +0200, Niklas Cassel wrote:
> >
> > How about we add a new pcitest --set-doorbell-mode option
> > (that is similar to pcitest -i which sets the interrupt mode to use).
> >
> > That way, we can do:
> > ./pcitest --set-doorbell-mode 1
> > (This will enable doorbell for e.g. BAR0, pci-epf-test will call
> > pci_epf_alloc_doorbell() when receiving this command from the RC side.
> > The command will return failure if pci_epf_alloc_doorbell() returned failure.)
> >
> > ./pcitest -B
> > (This will perform the doorbell test)
> >
> > ./pcitest --set-doorbell-mode 0
> > (This will disable the doorbell for BAR0,
> > so it will again not trigger IRQs when BAR0 is written,
> > and pcitest's tests to read/write the BARs will again behave as expected.)
> >
> > (We probably also need another option pcitest --get-doorbell-mode.)
> >
> > I think this should solve all your concerns. Thoughts?
>
> And just to clarify, if we go with the --set-doorbell-mode approach,
> then my previous idea (introducing capabilities in pci-epf-test and
> pci-endpoint-test) is no longer a necessity.

Yes, the problem is that it needs dynamatic switch bar mapping address.
I am not sure all EPC support it. DWC should support it because I did it
for vntb driver. But bar's size should be issue. PCI don't support change
bar's size after pci bus scan devices. ITS's offset is 0x40. Anyway,
ITS + DWC should work.

Frank

>
>
> Kind regards,
> Niklas




[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