Do you use the SDK 1.5?
Please check the Kernel configuration
Bus options --->
[*] PCI Express support
[*] Root Port Advanced Error Reporting
support
<*> PCIe AER error injector support
And the following test steps.
2.1In the uboot prompt: Adding pcie_ports=native to bootargs
=>setenv othbootargs pcie_ports=native
2.2Reboot the board with the kernel
# zcat /proc/config.gz|grep -i CONFIG_PCIEAER_INJECT
# cat /proc/cmdline
root=/dev/ram rw console=ttyS0,115200 pcie_ports=native
2.3Check wheather the inject device node is created.
# ls /dev/aer_inject
The test device node /dev/aer_inkect exists.
3. Download the aer_inject test program from "http://www.kernel.org/pub/linux/utils/pci/aer-inject/".
Cross compile it on the PC(server):
$ tar -xf aer-inject-0.1.tar.gz
$ cd aer-inject-0.1
$ source /opt/fsl/1.1/environment-setup-ppce500mc-fsl-linux
$ make
A binary file named "aer-inject" is created in current folder.
4. On the board:
Geting the pcie bus device and funciont number, and this step is a prepration for the next.
# lspci -vvv
01:00.1 Ethernet controller: Intel Corporation 82598EB 10-Gigabit AF Dual Port Network Connection (rev 01) Capabilities: [100] Advanced Error Reporting
Here "01:00.1" means BUS 1; device 0;function 1
5.
Write the test config file
In the aer-inject folder.
$ mkdir test
$ cd test
$ cat ear1
AER
BUS 1 DEV 0 FN 0
UNCOR_STATUS {ERROR_NUM}
HEADER_LOG 0 1 2 3
Note: {ERROR_NUM} should be one of
TRAIN,DLP,POISON_TLP,FCP,COMP_TIME,COMP_ABORT,UNX_COMP,RX_OVER,MALF_TLP,ECRC,UNS
6.Transfer the file aer-inject, aer1,aer2 and aer3 to the board
7.
root@p5020ds:~# ./aer-inject aer3
pcieport 0000:00:00.0: AER: Uncorrected (Fatal) error received: id=0100
e1000e 0000:01:00.0: PCIe Bus Error: severity=Uncorrected (Fatal), type=Unaccessible, id=0100(Unregistered Agent ID)
e1000e 0000:01:00.0: broadcast error_detected message
root@p5020ds:~# pcieport 0000:00:00.0: Root Port link has been reset
e1000e 0000:01:00.0: broadcast slot_reset message
e1000e 0000:01:00.0: Disabling ASPM L1
e1000e 0000:01:00.0: enabling device (0000 -> 0002)
e1000e 0000:01:00.0: restoring config space at offset 0x6 (was 0x1, writing 0x1001)
e1000e 0000:01:00.0: restoring config space at offset 0x5 (was 0x0, writing 0xe0020000)
e1000e 0000:01:00.0: restoring config space at offset 0x4 (was 0x0, writing 0xe0000000)
e1000e 0000:01:00.0: restoring config space at offset 0x3 (was 0x10, writing 0x8)
e1000e 0000:01:00.0: broadcast resume message
e1000e 0000:01:00.0: AER driver successfully recovered
e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
8.
Double check whether the pcie device can still work. Take the PCIE-NIC for example.
# ifocnfig eth0 192.168.1.2
# ping 192.168.1.1
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------