Kishon Vijay Abraham I | 0cfb512 | 2017-03-27 15:15:15 +0530 | [diff] [blame] | 1 | Driver for PCI Endpoint Test Function |
| 2 | |
| 3 | This driver should be used as a host side driver if the root complex is |
| 4 | connected to a configurable PCI endpoint running *pci_epf_test* function |
| 5 | driver configured according to [1]. |
| 6 | |
| 7 | The "pci_endpoint_test" driver can be used to perform the following tests. |
| 8 | |
| 9 | The PCI driver for the test device performs the following tests |
| 10 | *) verifying addresses programmed in BAR |
| 11 | *) raise legacy IRQ |
| 12 | *) raise MSI IRQ |
Gustavo Pimentel | c2e00e3 | 2018-07-19 10:32:19 +0200 | [diff] [blame] | 13 | *) raise MSI-X IRQ |
Kishon Vijay Abraham I | 0cfb512 | 2017-03-27 15:15:15 +0530 | [diff] [blame] | 14 | *) read data |
| 15 | *) write data |
| 16 | *) copy data |
| 17 | |
| 18 | This misc driver creates /dev/pci-endpoint-test.<num> for every |
| 19 | *pci_epf_test* function connected to the root complex and "ioctls" |
| 20 | should be used to perform the above tests. |
| 21 | |
| 22 | ioctl |
| 23 | ----- |
| 24 | PCITEST_BAR: Tests the BAR. The number of the BAR to be tested |
| 25 | should be passed as argument. |
| 26 | PCITEST_LEGACY_IRQ: Tests legacy IRQ |
| 27 | PCITEST_MSI: Tests message signalled interrupts. The MSI number |
| 28 | to be tested should be passed as argument. |
Gustavo Pimentel | c2e00e3 | 2018-07-19 10:32:19 +0200 | [diff] [blame] | 29 | PCITEST_MSIX: Tests message signalled interrupts. The MSI-X number |
| 30 | to be tested should be passed as argument. |
Gustavo Pimentel | e033271 | 2018-07-19 10:32:20 +0200 | [diff] [blame] | 31 | PCITEST_SET_IRQTYPE: Changes driver IRQ type configuration. The IRQ type |
| 32 | should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X). |
| 33 | PCITEST_GET_IRQTYPE: Gets driver IRQ type configuration. |
Kishon Vijay Abraham I | 0cfb512 | 2017-03-27 15:15:15 +0530 | [diff] [blame] | 34 | PCITEST_WRITE: Perform write tests. The size of the buffer should be passed |
| 35 | as argument. |
| 36 | PCITEST_READ: Perform read tests. The size of the buffer should be passed |
| 37 | as argument. |
| 38 | PCITEST_COPY: Perform read tests. The size of the buffer should be passed |
| 39 | as argument. |
| 40 | |
| 41 | [1] -> Documentation/PCI/endpoint/function/binding/pci-test.txt |