#!/bin/sh # SPDX-License-Identifier: GPL-2.0 echo 1 > /sys/bus/pci/rescan echo "BAR tests" echo bar=0 while [ $bar -lt 6 ] do pcitest -b $bar bar=`expr $bar + 1` done echo echo "Interrupt tests" echo #SET IRQ TYPE TO LEGACY: NOT OKAY #pcitest -i 0 ##LEGACY IRQ: NOT OKAY EP:pci_epf_test pci_epf_test.0: PCIE:pci_epf_test_raise_irq ===== 0 / 0 #pcitest -l # #SET IRQ TYPE TO MSI: OKAY pcitest -i 1 msi=1 # pci_epf_test pci_epf_test.0: PCIE:pci_epf_test_raise_irq ===== 1 / 0 pcitest -m 1 # pci_epf_test pci_epf_test.0: Invalid MSI IRQ number 2 / 0 pcitest -m 2 while [ $msi -lt 3 ] do pcitest -m $msi msi=`expr $msi + 1` done echo #SET IRQ TYPE TO MSI-X: OKAY pcitest -i 2 msix=1 while [ $msix -lt 3 ] do pcitest -x $msix msix=`expr $msix + 1` done echo echo "Read Tests" echo pcitest -i 1 pcitest -r -s 1 pcitest -r -s 1024 pcitest -r -s 1025 pcitest -r -s 1024000 pcitest -r -s 1024001 pcitest -d -r -s 1 pcitest -d -r -s 1024 pcitest -d -r -s 1025 pcitest -d -r -s 1024000 pcitest -d -r -s 1024001 echo echo "Write Tests" echo pcitest -w -s 1 pcitest -w -s 1024 pcitest -w -s 1025 pcitest -w -s 1024000 pcitest -w -s 1024001 pcitest -d -w -s 1 pcitest -d -w -s 1024 pcitest -d -w -s 1025 pcitest -d -w -s 1024000 pcitest -d -w -s 1024001 echo echo "Copy Tests" echo pcitest -c -s 1 pcitest -c -s 1024 pcitest -c -s 1025 pcitest -c -s 1024000 pcitest -c -s 1024001 pcitest -d -c -s 1 pcitest -d -c -s 1024 pcitest -d -c -s 1025 pcitest -d -c -s 1024000 pcitest -d -c -s 1024001 echo