Xavier not recognizing PCIe USB 3.1 card

I put a PCIe USB 3.1 card (HighPoint Technologies RocketU 1344A, which acording to the manufacturer is supposed to offer native Linux support) in the PCIe slot on my Xavier, and it isn’t being recognized at all. USB keyboards and mice plugged into the card’s USB ports con’t work, and running lspci -v shoes only the following:

0001:00:00.0 PCI bridge: NVIDIA Corporation Device 1ad2 (rev a1) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 34
	Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
	I/O behind bridge: 00000000-00000fff
	Memory behind bridge: 30200000-302fffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport

0001:01:00.0 SATA controller: Marvell Technology Group Ltd. Device 9171 (rev 13) (prog-if 01 [AHCI 1.0])
	Subsystem: Marvell Technology Group Ltd. Device 9171
	Flags: bus master, fast devsel, latency 0, IRQ 556
	I/O ports at 100010 
	I/O ports at 100020 
	I/O ports at 100018 
	I/O ports at 100024 
	I/O ports at 100000 
	Memory at 30210000 (32-bit, non-prefetchable) 
	Expansion ROM at 30200000 [disabled] 
	Capabilities: <access denied>
	Kernel driver in use: ahci
	Kernel modules: ahci

I have Jetpack 4.1 installed, and I’ve just run “sudo apt-get update” and “sudo apt-get upgrade”. Does anyone know what could be wrong here? Thank you.

Looks like only the devices already present are the only ones visible. I am curious, what do you see from:

sudo -s
ls /sys/bus/pci_express/devices
ls /sys/bus/pci/devices

Basically you can be guaranteed you’ll see the two system devices which are known to be present. I am curious if any other device shows up…are there only two devices, or does command line of “/sys” show three devices (it should show three if the card is visible)?

Running ls /sys/bus/pci_express/devices gave the following output:

0001:00:00.0:pcie001  0001:00:00.0:pcie002

I’m assuming that’s referring to the two system devices you were talking about, isn’t it?

Running ls /sys/bus/pci/devices gave the following error:

ls: cannot access 'sys/bus/pci/devices': No such file or directory

Can you please share the boot log with PCIe prints?
( sudo dmesg | grep -i pci )

Also, can you please try the patch mentioned in https://devtalk.nvidia.com/default/topic/1042559/jetson-agx-xavier/no-pcie-link-with-some-devices/post/5291033/#5291033 ?

Thank you, I had searched for other threads in the Xavier forum mentioning PCIe, but I didn’t see that one. How would I go about applying that patch?

Basically you’d download the kernel source which comes with the particular L4T release you are using. Recently R31.1 was released, and you are probably running R31.0.1 (original shipped release) or R31.0.2 (the first update you could flash). Right now the URLs for R31.0.x are missing due to the new release of R31.1, and I don’t know how the kernel might differ between your release and R31.1. On the other hand, R31.1 is recommended. Is there any chance you can flash R31.1 first, and then if the issue remains, download kernel source for R31.1?

Once you have kernel source it is much easier to explain. But basically the “—” and “+++” just names the same file in two different versions, and the lines starting with “+” or “-” are lines to add or remove. So for example, once you have kernel source, you would find subdirectory “kernel/nvidia/”. Within that, if you use “ls” on the path named by the patch, then you’d see the specific file. For that example note that both files have in common “drivers/pci/host/pcie-tegra-dw.c”. So from the “kernel/nvidia/” subdirectory this should work:

ls drivers/pci/host/pcie-tegra-dw.c

If you used an editor you could edit “pcie-tegra-dw.c”. Your goal would be to remove the “-” lines and insert the “+” lines. The patch utility does this automatically, but sometimes the tool syntax is a bit of a pain to explain and makes it sound more complicated than it really is. I’ll give an example though based on that first patch.

If you copy and paste that patch as a file named “my_diff1.patch”, and place it in some location outside of the kernel (so you don’t have to leave a mess in kernel source), then you can use it as follows…I assume the “my_diff1.patch” is located at “~/my_diff1.patch”:

cd /where/ever/it/is/kernel/nvidia
patch -p1 < ~/my_patch1.patch

The “-p1” is because you are stripping off the “a/” and “b/” prefix (one level) of the “—” and “+++” lines at the start. Patch now knows it can see the old version of “pcie-tegra-dw.c” at “drivers/pci/host/pcie-tegra-dw.c”. Then the patch utility will do the work. Had you not stripped off the leading “a/” and “b/” via one level of prefix stripping, then the tool would have been able to find the file.

In places where the patch found and updated the right code block it will tell you a “hunk” succeeded. In some cases where parts of patches are already in place only the parts which needed update will be noted as succeeded. If you examine the file after the patch you will note the “-” lines were removed and the “+” lines were added.

If instead of “cd kernel/nvidia” you had done “cd kernel/nvidia/drivers/pci/host”, then you would need the “-p1” to instead be “-p5” to strip four more leading directories.

After that you need to compile the kernel. Docs with the release provide instructions for that.

Thank you. I’ve just flashed my Xavier with the newly released Jetpack 4.1.1, and now the card appears to be recognized properly.