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 -- மணிவண்ணன் சதாசிவம்