cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
2,550 Views
Registered: ‎08-20-2014

PCIe Gen2 x4 linux driver failing on Jetson TX2

Hello,

 

we have developed a carrier board for Jetson TX2 with an Artix7 fpga on the carrier board. We have a PCIe GEN2 x4 connection between the TX2 and the Artix7, and we are using the linux driver we downloaded from Answers#65444 but we have trouble in getting this Xilinx linux driver running.

 

When we do lspci on jetson we get to see the Artix7:

 

nvidia@tegra-ubuntu:~$ lspci
00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)
01:00.0 Serial controller: Xilinx Corporation Device 7024

 

Whereas when we try to load the Xilinx reference driver it says "Error: The Kernel module installed correctly, but no devices were recognized."

dmesg output is:

[ 2997.348703] tegradc 15210000.nvdisplay: hdmi: pclk:74250K, set prod-setting:prod_c_75M
[ 2997.408907] tegradc 15210000.nvdisplay: unblank
[ 3460.512839] xdma:xdma_mod_init: Xilinx XDMA Reference Driver xdma v2017.1.47
[ 3460.520260] xdma:xdma_mod_init: desc_blen_max: 0xfffffff/268435455, sgdma_timeout: 10 sec.
[ 3460.528930] xdma:xdma_device_open: xxx 0xffffffc0683ff700.
[ 3460.534521] xdma:xdma_device_open: xxx 0xffffffc0683ff700.
[ 3460.540096] xdma:xdma_device_open: xdma device 0000:01:00.0, 0xffffffc1deba6800.
[ 3460.547556] xdma:pci_check_extended_tag: 0xffffffc1deba6800 EXT_TAG disabled.
[ 3460.554807] xdma:pci_check_extended_tag: pdev 0xffffffc1deba6800, xdev 0xffffffc1a92ee000, config bar UNKNOWN.
[ 3460.567029] xdma:map_single_bar: BAR0 at 0x51000000 mapped at 0xffffff8011d80000, length=16777216(/16777216)
[ 3460.586990] pcieport 0000:00:01.0: AER: Uncorrected (Non-Fatal) error received: id=0020
[ 3460.597209] pcieport 0000:00:01.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, id=0008(Requester ID)
[ 3460.597289] xdma:map_single_bar: BAR1 at 0x50800000 mapped at 0xffffff80020c0000, length=65536(/65536)
[ 3460.617396] xdma:map_bars: Failed to detect XDMA config BAR
[ 3460.632305] pcieport 0000:00:01.0: device [10de:10e5] error status/mask=00004000/00000000
[ 3460.640694] pcieport 0000:00:01.0: [14] Completion Timeout (First)
[ 3460.647535] pcieport 0000:00:01.0: broadcast error_detected message
[ 3460.650568] xdma: probe of 0000:01:00.0 failed with error -22
[ 3460.659699] pcieport 0000:00:01.0: AER: Device recovery failed
[ 3460.665577] pcieport 0000:00:01.0: AER: Uncorrected (Non-Fatal) error received: id=0020
[ 3460.673653] pcieport 0000:00:01.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, id=0008(Requester ID)
[ 3460.685432] pcieport 0000:00:01.0: device [10de:10e5] error status/mask=00004000/00000000
[ 3460.693807] pcieport 0000:00:01.0: [14] Completion Timeout (First)
[ 3460.700637] pcieport 0000:00:01.0: broadcast error_detected message
[ 3460.706947] pcieport 0000:00:01.0: AER: Device recovery failed
[ 3460.712791] pcieport 0000:00:01.0: AER: Multiple Uncorrected (Non-Fatal) error received: id=0020
[ 3460.721598] pcieport 0000:00:01.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, id=0008(Requester ID)
[ 3460.733338] pcieport 0000:00:01.0: device [10de:10e5] error status/mask=00004000/00000000
[ 3460.741694] pcieport 0000:00:01.0: [14] Completion Timeout (First)
[ 3460.748492] pcieport 0000:00:01.0: broadcast error_detected message
[ 3460.755099] pcieport 0000:00:01.0: AER: Device recovery failed


Seems like something goes wrong after the BAR reads, (BAR0 & BAR1 seems to be read correctly, there is an erro indicaation after AR0 read as well) then the driver fails.

So Linux can detect pci device address and create BAR0 and BAR1 memory registers but then it fails.

Where might we be doing wrong? Are there any ways to debug our driver? 

Looking forward to hearing from you.

Kind regards.

Hakan

0 Kudos
Reply
2 Replies
venkata
Moderator
Moderator
2,505 Views
Registered: ‎02-16-2010

I hope you have used XDMA IP. Please confirm. I am asking this question based on the following log.

[ 3460.617396] xdma:map_bars: Failed to detect XDMA config BAR
------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
Reply
wang1231987
Newbie
Newbie
2,429 Views
Registered: ‎07-06-2018

I have the same problem.I have used K7 board the the XDMA IP.And I have used the xdma driver from the Answer  65444.

When we do lspci on jetson we get to see the K7 board:

nvidia@tegra-ubuntu:~/Desktop/xdma_driver/Xilinx_Answer_65444_Linux_Files/driver$ lspci
00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)
01:00.0 Serial controller: Xilinx Corporation Device 6022

 

Go to the tests directory and run the load_drivers.sh script.We see the following information.

 

nvidia@tegra-ubuntu:~/Desktop/xdma_driver/Xilinx_Answer_65444_Linux_Files/tests$ sudo ./load_driver.sh
xdma 40810 0
Loading driver...
Error: The Kernel module installed correctly, but no devices were recognized.

 

When we do the lsmod, we can see xdma.

nvidia@tegra-ubuntu:~/Desktop/xdma_driver/Xilinx_Answer_65444_Linux_Files/tests$ lsmod
Module Size Used by
xdma 40810 0
fuse 82192 2
ipt_MASQUERADE 2115 1
nf_nat_masquerade_ipv4 2931 1 ipt_MASQUERADE

 

But we do the cat /proc/devices | grep xdma, we can't find xdma.

What's going on here? What should I do? Think you very much.

 

 

0 Kudos
Reply