pci-endpoint-test.rst 1.8 KB

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