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