Orin nx board pcie endpoint transfer test problem

板子与pc链接
根据手册
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Communications/PcieEndpointMode.html
已经完成ep与rc的配置,lspci上可以看到设备

0000:05:00.0 Unassigned class [ff00]: NVIDIA Corporation Device 0001
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at 85e00000 (64-bit, non-prefetchable) [size=1M]
	Memory at 6001e00000 (64-bit, prefetchable) [size=128K]
	Memory at 85f00000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [b0] MSI-X: Enable+ Count=8 Masked-
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [148] Secondary PCI Express
	Capabilities: [168] Physical Layer 16.0 GT/s <?>
	Capabilities: [18c] Lane Margining at the Receiver <?>
	Capabilities: [1a4] Latency Tolerance Reporting
	Capabilities: [1ac] L1 PM Substates
	Capabilities: [1bc] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
	Capabilities: [2bc] Vendor Specific Information: ID=0001 Rev=1 Len=038 <?>
	Capabilities: [2f4] Data Link Feature <?>
	Capabilities: [300] Precision Time Measurement
	Capabilities: [30c] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
	Capabilities: [374] Vendor Specific Information: ID=0006 Rev=0 Len=018 <?>
	Kernel driver in use: pci-endpoint-test
	Kernel modules: pci_endpoint_test

但是运行pcitest.sh时,任务卡住
dmesg显示

 [  846.921118] INFO: task pcitest:3418 blocked for more than 120 seconds.
[  846.921135]       Tainted: G           OE     5.15.0-89-generic #99~20.04.1-Ubuntu
[  846.921141] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  846.921143] task:pcitest         state:D stack:    0 pid: 3418 ppid:  3311 flags:0x00000000
[  846.921155] Call Trace:
[  846.921159]  <TASK>
[  846.921165]  __schedule+0x2cd/0x890
[  846.921179]  ? usleep_range_state+0x90/0x90
[  846.921188]  schedule+0x69/0x110
[  846.921194]  schedule_timeout+0x206/0x2d0
[  846.921203]  ? putname+0x57/0x70
[  846.921209]  ? usleep_range_state+0x90/0x90
[  846.921216]  __wait_for_common+0xb0/0x160
[  846.921224]  wait_for_completion+0x24/0x30
[  846.921232]  pci_endpoint_test_ioctl+0x92f/0xcd7 [pci_endpoint_test]
[  846.921242]  __x64_sys_ioctl+0x92/0xd0
[  846.921249]  do_syscall_64+0x59/0xc0
[  846.921256]  entry_SYSCALL_64_after_hwframe+0x62/0xcc
[  846.921262] RIP: 0033:0x7f28999ac3ab
[  846.921267] RSP: 002b:00007ffd229622d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  846.921274] RAX: ffffffffffffffda RBX: 000056398a36e004 RCX: 00007f28999ac3ab
[  846.921277] RDX: 00007ffd229622e0 RSI: 0000000040085005 RDI: 0000000000000003
[  846.921281] RBP: 000056398ac872a0 R08: 0000000000000000 R09: 0000000000000000
[  846.921284] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffea
[  846.921287] R13: 0000000000000003 R14: 00007ffd229622e0 R15: 0000000000000001
[  846.921292]  </TASK>

无法进行读写测试

尝试使用linux kernel提供的方式使用pci-epf-test替代pci-epf-nv-test
https://www.kernel.org/doc/html/latest/PCI/endpoint/pci-test-howto.html
步骤完全按照手册进行操作
运行pcitest.sh还反馈msi与msix不成功

> BAR tests
> 
> BAR0:		OKAY
> BAR1:		NOT OKAY
> BAR2:		NOT OKAY
> BAR3:		NOT OKAY
> BAR4:		NOT OKAY
> BAR5:		NOT OKAY
> 
> Interrupt tests
> 
> SET IRQ TYPE TO LEGACY:		OKAY
> LEGACY IRQ:	OKAY
> SET IRQ TYPE TO MSI:		OKAY
> MSI1:		OKAY
> MSI2:		NOT OKAY
> MSI3:		NOT OKAY
> MSI4:		NOT OKAY
> MSI5:		NOT OKAY
> MSI6:		NOT OKAY
> MSI7:		NOT OKAY
> MSI8:		NOT OKAY
> MSI9:		NOT OKAY
> MSI10:		NOT OKAY
> MSI11:		NOT OKAY
> MSI12:		NOT OKAY
> MSI13:		NOT OKAY
> MSI14:		NOT OKAY
> MSI15:		NOT OKAY
> MSI16:		NOT OKAY
> MSI17:		NOT OKAY
> MSI18:		NOT OKAY
> MSI19:		NOT OKAY
> MSI20:		NOT OKAY
> MSI21:		NOT OKAY
> MSI22:		NOT OKAY
> MSI23:		NOT OKAY
> MSI24:		NOT OKAY
> MSI25:		NOT OKAY
> MSI26:		NOT OKAY
> MSI27:		NOT OKAY
> MSI28:		NOT OKAY
> MSI29:		NOT OKAY
> MSI30:		NOT OKAY
> MSI31:		NOT OKAY
> MSI32:		NOT OKAY
> 
> SET IRQ TYPE TO MSI-X:		OKAY
> MSI-X1:		NOT OKAY
> MSI-X2:		NOT OKAY
> MSI-X3:		NOT OKAY
> MSI-X4:		NOT OKAY
> MSI-X5:		NOT OKAY
> MSI-X6:		NOT OKAY
> MSI-X7:		NOT OKAY
> MSI-X8:		NOT OKAY
> MSI-X9:		NOT OKAY

与正常结果不符

请问是哪里需要修改

Duplicated with PCIE test probelem - Jetson & Embedded Systems / Jetson Orin NX - NVIDIA Developer Forums, please continue updating at your previous topic if you have new finding. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.