Re: [PATCH 7/7] misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO

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

 



On Mon, Mar 10, 2025 at 12:10:24PM +0100, Niklas Cassel wrote:
> For PCITEST_MSI we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_MSI, since we want to test if MSI works.
> 
> For PCITEST_MSIX we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_MSIX, since we want to test if MSI works.
> 
> For PCITEST_LEGACY_IRQ we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_INTX, since we want to test if INTx works.
> 
> However, for PCITEST_WRITE, PCITEST_READ, PCITEST_COPY, we really don't
> care which IRQ type that is used, we just want to use a IRQ type that is
> supported by the EPC.
> 
> The old behavior was to always use MSI for PCITEST_WRITE, PCITEST_READ,
> PCITEST_COPY, was to always set IRQ type to MSI before doing the actual
> test, however, there are EPC drivers that do not support MSI.
> 
> Add a new PCITEST_IRQ_TYPE_AUTO, that will use the CAPS register to see
> which IRQ types the endpoint supports, and use one of the supported IRQ
> types.
> 

If the intention is to let the test figure out the supported IRQ type, why can't
you move the logic to set the supported IRQ to
pci_endpoint_test_{copy/read/write} functions itself?

PCITEST_IRQ_TYPE_AUTO is not really an IRQ type. So adding it doesn't look right
to me.

- Mani

-- 
மணிவண்ணன் சதாசிவம்




[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