1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun===================================== 4*4882a593SmuzhiyunDriver for PCI Endpoint Test Function 5*4882a593Smuzhiyun===================================== 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis driver should be used as a host side driver if the root complex is 8*4882a593Smuzhiyunconnected to a configurable PCI endpoint running ``pci_epf_test`` function 9*4882a593Smuzhiyundriver configured according to [1]_. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThe "pci_endpoint_test" driver can be used to perform the following tests. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunThe PCI driver for the test device performs the following tests: 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun #) verifying addresses programmed in BAR 16*4882a593Smuzhiyun #) raise legacy IRQ 17*4882a593Smuzhiyun #) raise MSI IRQ 18*4882a593Smuzhiyun #) raise MSI-X IRQ 19*4882a593Smuzhiyun #) read data 20*4882a593Smuzhiyun #) write data 21*4882a593Smuzhiyun #) copy data 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunThis misc driver creates /dev/pci-endpoint-test.<num> for every 24*4882a593Smuzhiyun``pci_epf_test`` function connected to the root complex and "ioctls" 25*4882a593Smuzhiyunshould be used to perform the above tests. 26*4882a593Smuzhiyun 27*4882a593Smuzhiyunioctl 28*4882a593Smuzhiyun----- 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun PCITEST_BAR: 31*4882a593Smuzhiyun Tests the BAR. The number of the BAR to be tested 32*4882a593Smuzhiyun should be passed as argument. 33*4882a593Smuzhiyun PCITEST_LEGACY_IRQ: 34*4882a593Smuzhiyun Tests legacy IRQ 35*4882a593Smuzhiyun PCITEST_MSI: 36*4882a593Smuzhiyun Tests message signalled interrupts. The MSI number 37*4882a593Smuzhiyun to be tested should be passed as argument. 38*4882a593Smuzhiyun PCITEST_MSIX: 39*4882a593Smuzhiyun Tests message signalled interrupts. The MSI-X number 40*4882a593Smuzhiyun to be tested should be passed as argument. 41*4882a593Smuzhiyun PCITEST_SET_IRQTYPE: 42*4882a593Smuzhiyun Changes driver IRQ type configuration. The IRQ type 43*4882a593Smuzhiyun should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X). 44*4882a593Smuzhiyun PCITEST_GET_IRQTYPE: 45*4882a593Smuzhiyun Gets driver IRQ type configuration. 46*4882a593Smuzhiyun PCITEST_WRITE: 47*4882a593Smuzhiyun Perform write tests. The size of the buffer should be passed 48*4882a593Smuzhiyun as argument. 49*4882a593Smuzhiyun PCITEST_READ: 50*4882a593Smuzhiyun Perform read tests. The size of the buffer should be passed 51*4882a593Smuzhiyun as argument. 52*4882a593Smuzhiyun PCITEST_COPY: 53*4882a593Smuzhiyun Perform read tests. The size of the buffer should be passed 54*4882a593Smuzhiyun as argument. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun.. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst 57