Intel 9260 WiFi on jetson nano / jetbot

I now have a Jetson Nano that is going into a JetBot. I purchased an Intel 9260 wifi mini-PCIe card.
the wifi is not working, and I am wondering how to make it so.

$ uname -a
Linux jetbot 4.9.140-tegra #1 SMP PREEMPT Wed Mar 13 00:32:22 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

If I manually insert kernel module, there are no import errors, but things are still broken.

$ sudo modprobe -v iwlwifi
insmod /lib/modules/4.9.140-tegra/kernel/net/wireless/cfg80211.ko
insmod /lib/modules/4.9.140-tegra/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko

It appears it was intended to be supported…

modinfo iwlwifi
...
firmware:       iwlwifi-9260-th-a0-jf-a0--26.ucode
jetbot@jetbot:~$ ls -l1 /lib/firmware/iwlwifi-9260*
-rw-r--r-- 1 root root 2637216 Apr 24  2018 /lib/firmware/iwlwifi-9260-th-b0-jf-b0-33.ucode
-rw-r--r-- 1 root root 2678092 Dec 14 05:23 /lib/firmware/iwlwifi-9260-th-b0-jf-b0-34.ucode
-rw-r--r-- 1 root root 2521412 Dec 14 04:54 /lib/firmware/iwlwifi-9260-th-b0-jf-b0-38.ucode
$ sudo lspci -nnk
00:01.0 PCI bridge [0604]: NVIDIA Corporation Device [10de:0fae] (rev a1)
	Kernel driver in use: pcieport
00:02.0 PCI bridge [0604]: NVIDIA Corporation Device [10de:0faf] (rev a1)
	Kernel driver in use: pcieport
01:00.0 Network controller [0280]: Intel Corporation Wireless-AC 9260 [8086:2526] (rev 29)
	Subsystem: Intel Corporation Device [8086:0014]
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
	Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123]
	Kernel driver in use: r8168
$ sudo lshw -C network
  *-network UNCLAIMED
       description: Network controller
       product: Wireless-AC 9260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 29
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix cap_list
       configuration: latency=0
       resources: memory:13000000-13003fff

Intel officially starts supporting in kernel 4.14 according to https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi; can I update the ubuntu kernel on my jetbot to something later than 4.9 and still have everything else working?

Also I found a way to backport kernel driver in these forums (https://devtalk.nvidia.com/default/topic/1039522/jetson-agx-xavier/intel-9260-adapter-not-working/post/5308646/#5308646) but it is very unclear where I can get the matching linux kernel headers and source for the 4.9.140-tegra used in the jetbot image.

I don’t know my 3168ac is supported since kernel 4.6, but it’s not working too

miku@JestonNano:~$ lspci
00:01.0 PCI bridge: NVIDIA Corporation Device 0fae (rev a1)
00:02.0 PCI bridge: NVIDIA Corporation Device 0faf (rev a1)
01:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev ff)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

Mine is not showing up here, yours is there…while I can’t help u, maybe u can help me

miku@JestonNano:~$ sudo lshw -C network
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 15
       serial: 00:e0:4c:68:00:9e
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=half latency=0 link=no multicast=yes port=twisted pair speed=10Mbit/s
       resources: irq:404 ioport:1000(size=256) memory:13104000-13104fff memory:13100000-13103fff
  *-network:0
       description: Ethernet interface
       physical id: 3
       logical name: usb0
       serial: b6:06:30:98:6b:9b
       capabilities: ethernet physical
       configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=tegra-xudc link=no multicast=yes
  *-network:1
       description: Ethernet interface
       physical id: 4
       logical name: l4tbr0
       serial: b6:06:30:98:6b:99
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=192.168.55.1 link=no multicast=yes
  *-network:2 DISABLED
       description: Ethernet interface
       physical id: 5
       logical name: dummy0
       serial: 72:ca:dd:0d:db:7f
       capabilities: ethernet physical
       configuration: broadcast=yes driver=dummy driverversion=1.0
  *-network:3
       description: Ethernet interface
       physical id: 6
       logical name: rndis0
       serial: b6:06:30:98:6b:99
       capabilities: ethernet physical
       configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=tegra-xudc link=no multicast=yes

Partly answering my own questions:

In the 32.1 release found on https://developer.nvidia.com/embedded/linux-tegra-archive I see sources, and up-to-date pointers to instructions.

So next step, I plan to download the kernel sources/headers and build using the regular uSD image (not jetbot), along with the backport, to see if I can get the Intel 9260 WiFi working

Discovered that the Jetson Nano DevKit image (that I switched to) already has its kernel headers available for kernel module builds.

/usr/src/linux-headers-$(uname -r)-ubuntu18.04_aarch64
/lib/modules/$(uname -r)/build

Was able to successfully build/install backport-iwlwifi as outlined here https://devtalk.nvidia.com/default/topic/1039522/jetson-agx-xavier/intel-9260-adapter-not-working/post/5308646/#5308646

mkdir -p ~/projects
cd ~/projects
git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git
cd backport-iwlwifi
make defconfig-iwlwifi-public
# configuration written to .config
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install

Then I reboot. Module is automatically loaded!

lsmod | grep iwlwifi
iwlwifi               448519  0
cfg80211              756778  1 iwlwifi
compat                119814  2 iwlwifi,cfg80211
modinfo iwlwifi | grep iwlwifi-92
firmware:       iwlwifi-9260-th-b0-jf-b0-46.ucode

However, get an error in dmesg when it tries to initialize

[    8.106358] compat: loading out-of-tree module taints kernel.
[    8.143422] Loading modules backported from iwlwifi
[    8.143425] iwlwifi-stack-public:master:7729:c626a29a
...
[    8.997313] Intel(R) Wireless WiFi driver for Linux
[    8.997317] Copyright(c) 2003- 2015 Intel Corporation
[    8.997466] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
[    9.015169] iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues?
<b>[    9.037933] iwlwifi: probe of 0000:01:00.0 failed with error -5</b>

And it’s not found by iwconfig, ifconfig, and still unclaimed in “sudo lshw -C network”

2 Likes

Could you investigate why driver reports error and PCI issue?

I am having the exact same issue, the iwlwifi backport compilation works and the driver module gets loaded after rebooting, however (according to dmesg) it crashes out with the HW_REV=0xFFFFFFFF error. Downloading the most recent firmware blobs from kernel/git/iwlwifi/linux-firmware.git - iwlwifi linux-firmware tree - for linux-firmware doesn’t seem to make any difference either. I am rather inexperienced in debugging linux kernel drivers however, could you provide some pointers (or links) to how to proceed?

Could you give me steps on what this would be? Everything I’ve tried so far was found by me searching multiple different sets of terms on this forum and on google.

  • The 32.1/4.9.140 kernel published in the µSD images (jetbot, or main DevKit one) has an included iwlwifi driver with multiple copies of 9260 firmware. (see OP: ls -l1 /lib/firmware/iwlwifi-9260*) Module doesn't get loaded, however, and manual module kernel insertion does not claim 9260
  • the backports-iwlwifi out-of-tree driver module that I built does get auto-loaded, but fails on the probe (iwlwifi: probe of 0000:01:00.0 failed with error -5)

I tried git grep-ping though kernel source and backports-iwlwifi source, but couldn’t identify what the error -5 means.

I think it is the line above that one that is the key, it’s an error thrown during the wifi chip load:
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/tree/drivers/net/wireless/intel/iwlwifi/pcie/trans.c#n3549

The -5 is just the generic error getting thrown later.

Finding where the error is thrown unfortunately doesn’t really help unless you know what to do next :p.

noticed that FW referenced in the backports-iwlwifi driver was absent from /lib/firmware

modinfo iwlwifi | grep 9260
# firmware:       iwlwifi-9260-th-b0-jf-b0-46.ucode
sudo wget -O /lib/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-9260-th-b0-jf-b0-46.ucode
ls -1l /lib/firmware/ | grep iwlwifi-9260-th-b0-jf-b0-46.ucode
# -rw-r--r--  1 root root 1459224 Apr 19 11:03 iwlwifi-9260-th-b0-jf-b0-46.ucode
sudo reboot

After rebooting, receiving the same error:

[  469.824631] Intel(R) Wireless WiFi driver for Linux
[  469.824635] Copyright(c) 2003- 2015 Intel Corporation
[  469.825983] iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues?
[  469.832075] iwlwifi: probe of 0000:01:00.0 failed with error -5

Does the HW_REV reading back HW_REV=0xFFFFFFFF point to some platform issue?

backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/cfg$ git log -p 9000.c | grep IWL9000_UCODE_API_MAX | head
-#define IWL9000_UCODE_API_MAX	45
+#define IWL9000_UCODE_API_MAX	46
-#define IWL9000_UCODE_API_MAX	44
+#define IWL9000_UCODE_API_MAX	45

Next I think I may try an older combo of the iwlwifi driver/firmware, as there have been recent changes: https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/commit/?id=dc3ea41c3ba677c98f0774be2fc8d2631c04f12e

I don’t think the firmware is the problem, nor do I think versions of the drivers are. I found the “core” release page for the backports-iwlwifi repo and it has validated backport/firmware pairs: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release#core_release

I tried core38, core40, and core43 which are all supported for the 9260 and they all are getting the same dmesg error, HW_REV=0xFFFFFFFF At this point I think it is pointing to a platform interaction?

I don’t really know how to debug further kernel driver modules.

BUILD template

cd ~/projects/backport-iwlwifi
git checkout release/core38
sudo wget -O /lib/firmware/iwlwifi-9260-th-b0-jf-b0-41.ucode \
    https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-9260-th-b0-jf-b0-41.ucode
make clean
make defconfig-iwlwifi-public
# https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release#how_to_install_the_driver
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install

core38 results

dmesg | grep iwlwifi
[    7.952899] Loading modules backported from iwlwifi
[b][    7.952902] iwlwifi-stack-public:release/core38:7137:edc2a489
[/b][    9.033793] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
[    9.034504]<b> iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues?</b>
[    9.042376]<b> iwlwifi: probe of 0000:01:00.0 failed with error -5</b>

modinfo iwlwifi | grep 9260
firmware:       iwlwifi-9260-th-b0-jf-b0-41.ucode
firmware:       iwlwifi-9260-th-a0-jf-a0-41.ucode

core40 results

dmesg | grep iwlwifi
[    8.160149] Loading modules backported from iwlwifi
[b][    8.160153] iwlwifi-stack-public:release/core40:7359:e8368768
[/b][    8.719375] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
[b][    8.720172] iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues?
[    8.727925] iwlwifi: probe of 0000:01:00.0 failed with error -5
[/b]
modinfo iwlwifi | grep 9260
firmware:       iwlwifi-9260-th-b0-jf-b0-43.ucode

core43 results

dmesg | grep iwlwifi
[    7.679377] Loading modules backported from iwlwifi
[b][    7.679380] iwlwifi-stack-public:release/core43:7580:bedbcd04
[/b][    9.001336] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
[b][    9.003415] iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues?
[    9.017175] iwlwifi: probe of 0000:01:00.0 failed with error -5
[/b]
modinfo iwlwifi | grep 9260
firmware:       iwlwifi-9260-th-b0-jf-b0-46.ucode

Driver Source code
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git/tree/drivers/net/wireless/intel/iwlwifi/iwl-trans.c

drivers/net/wireless/intel/iwlwifi/pcie/trans.c: 
        trans->hw_rev = iwl_read32(trans, CSR_HW_REV);
        if (trans->hw_rev == 0xffffffff) {
                <b>dev_err(&pdev->dev, "HW_REV=0xFFFFFFFF, PCI issues?\n");</b>
                ret = -EIO;
                goto out_no_pci;
        }
drivers/net/wireless/intel/iwlwifi/iwl-csr.h:#define CSR_HW_REV              (CSR_BASE+0x028)
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
 
/**
 *  hw_rev values
 */
enum {
        SILICON_A_STEP = 0,
        SILICON_B_STEP,
        SILICON_C_STEP,
};
sudo lspci -nnk -s 01:00.0
01:00.0 Network controller [0280]: Intel Corporation Wireless-AC 9260 [8086:2526] (rev 29)
	Subsystem: Intel Corporation Device [8086:0014]
	Kernel modules: iwlwifi

I have no way of testing this, but since syhost made it work on Xavier in the link you provided earlier with some tricks with the kernel sources, could our problem be related? I.e. would it be possible to compile the module against kernel sources downloaded from the nv-tegra git?

I made a patch in pcie/trans.c, which skips HW_REV check/error and adds iwl_trans_pcie_dump_regs(trans); :

@@ -3542,11 +3542,14 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
 	iwl_disable_interrupts(trans);

 	trans->hw_rev = iwl_read32(trans, CSR_HW_REV);
-	if (trans->hw_rev == 0xffffffff) {
-		dev_err(&pdev->dev, "HW_REV=0xFFFFFFFF, PCI issues?\n");
-		ret = -EIO;
-		goto out_no_pci;
-	}
+	/* if (trans->hw_rev == 0xffffffff) { */
+	/* 	dev_err(&pdev->dev, "HW_REV=0xFFFFFFFF, PCI issues?\n"); */
+	/* 	ret = -EIO; */
+	/* 	goto out_no_pci; */
+	/* } */
+
+    iwl_trans_pcie_dump_regs(trans);
+

 	/*
 	 * In the 8000 HW family the format of the 4 bytes of CSR_HW_REV have

It prints some related info and not everything is ffffffff so that is potentially useful… Maybe there’s a clue here about stepping? though I took the HW_REV assertion out, so it is probably related to that (doesn’t match a supported stepping)

[   71.062520] iwlwifi 0000:01:00.0: Only HW steps B and C are currently supported (0xfffc)
[   71.072529] iwlwifi 0000:01:00.0: Couldn't request the fw
[   71.099355] iwlwifi: probe of 0000:01:00.0 failed with error -22
dpc@nvjn2:~$ dmesg | grep iwlwifi
[    7.641451] Loading modules backported from iwlwifi
[    7.641454] iwlwifi-stack-public:release/core44:7697:4fbb92e9
[    8.846740] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)
[    8.848587] iwlwifi 0000:01:00.0: iwlwifi transaction failed, dumping registers
[    8.857669] iwlwifi 0000:01:00.0: iwlwifi device config registers:
[    8.867266] iwlwifi 0000:01:00.0: 00000000: 25268086 00100006 02800029 00000000 00000004 00000000 00000000 00000000
[    8.879827] iwlwifi 0000:01:00.0: 00000020: 00000000 00000000 00000000 00148086 00000000 000000c8 00000000 00000100
[    8.892619] iwlwifi 0000:01:00.0: iwlwifi device memory mapped registers:
[    8.902643] iwlwifi 0000:01:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[    8.917315] iwlwifi 0000:01:00.0: 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[    8.935427] iwlwifi 0000:01:00.0: iwlwifi device AER capability structure:
[    8.953121] iwlwifi 0000:01:00.0: 00000000: 14c10001 00100000 00000000 00462031 00002000 00002000 00000014 40000001
[    8.965505] iwlwifi 0000:01:00.0: 00000020: 0010000f 1300000c 00000000
[    8.974047] iwlwifi 0000:01:00.0: iwlwifi parent port (0000:00:01.0) config registers:
[    8.983987] iwlwifi 0000:00:01.0: 00000000: 0fae10de 40100107 060400a1 00010000 00000000 00000000 00010100 200001f1
[    8.996443] iwlwifi 0000:00:01.0: 00000020: 13001300 0001fff1 00000000 00000000 00000000 00000040 00000000 00000154
[    9.008825] iwlwifi 0000:01:00.0: iwlwifi root port (0000:00:01.0) AER cap structure:
[    9.019650] iwlwifi 0000:00:01.0: 00000000: 14010001 00004000 00000000 00062011 00000000 00002000 000000ae 0a000001
[    9.032004] iwlwifi 0000:00:01.0: 00000020: 0000a010 00100348 00000000 00000007 00000000 00100000
[    9.067193] WARNING: CPU: 2 PID: 3507 at /home/dpc/projects/backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2041 iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.085439] Modules linked in: iwlwifi(O+) nvs cfg80211(O) compat(O) nvgpu bluedroid_pm ip_tables x_tables
[    9.085557] PC is at iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.085639] LR is at iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.092407] [<ffffff80012a3fb0>] iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.092488] [<ffffff80012a8330>] iwl_trans_pcie_alloc+0x410/0xea0 [iwlwifi]
[    9.092569] [<ffffff8001296c8c>] iwl_pci_probe+0x3c/0x298 [iwlwifi]
[    9.092684] [<ffffff800129731c>] iwl_pci_register_driver+0x24/0x68 [iwlwifi]
[    9.092761] [<ffffff80012fb094>] __init_backport+0x94/0xe8 [iwlwifi]
[    9.095350] iwlwifi 0000:01:00.0: Direct firmware load for iwl-dbg-cfg.ini failed with error -2
[    9.106232] iwlwifi 0000:01:00.0: Falling back to user helper
[   71.062520] iwlwifi 0000:01:00.0: Only HW steps B and C are currently supported (0xfffc)
[   71.072529] iwlwifi 0000:01:00.0: Couldn't request the fw
[   71.099355] iwlwifi: probe of 0000:01:00.0 failed with error -22

from dmesg

[    9.060538] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
[    9.060589] ------------[ cut here ]------------
[    9.067193] WARNING: CPU: 2 PID: 3507 at /home/dpc/projects/backport-iwlwifi/drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2041 iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.085439] Modules linked in: iwlwifi(O+) nvs cfg80211(O) compat(O) nvgpu bluedroid_pm ip_tables x_tables
[    9.085461] CPU: 2 PID: 3507 Comm: systemd-udevd Tainted: G           O    4.9.140-tegra #1
[    9.085463] Hardware name: jetson-nano (DT)
[    9.085465] task: ffffffc0ebe80e00 task.stack: ffffffc0ebe7c000
[    9.085557] PC is at iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.085639] LR is at iwl_trans_pcie_grab_nic_access+0x1a8/0x270 [iwlwifi]
[    9.085642] pc : [<ffffff80012a3fb0>] lr : [<ffffff80012a3fb0>] pstate: 404000c5
[    9.085643] sp : ffffffc0ebe7f980
[    9.085645] x29: ffffffc0ebe7f980 x28: ffffff80012cf830
[    9.085650] x27: ffffffc0ebe7fa38 x26: ffffff80012dc4f8
[    9.085654] x25: ffffff80012c4f80 x24: ffffff80012c8430
[    9.085658] x23: 00000000ffffffff x22: 0000000000000001
[    9.085662] x21: ffffffc0ebe7fa38 x20: ffffffc0e448956c
[    9.085666] x19: ffffffc0e4480018 x18: 0000000000000030
[    9.085670] x17: 0000000000000001 x16: 0000000000000007
[    9.085674] x15: ffffffffffffffff x14: ffffff800a104240
[    9.085677] x13: 0000000000000000 x12: 0000000000000006
[    9.085681] x11: 0000000000000002 x10: 0000000000000335
[    9.085685] x9 : 0000000000000001 x8 : ffffffc0fefc2beb
[    9.085688] x7 : 0000000000000000 x6 : 0000000011693634
[    9.085692] x5 : 0000000000011bec x4 : ffffffc0ff003be8
[    9.085695] x3 : ffffffc0ff003be8 x2 : 0000000000000007
[    9.085699] x1 : ffffffc0ebe80e00 x0 : 000000000000003d

[    9.085704] ---[ end trace 5ff090ce8a1bcdb3 ]---

Are you suggesting that I try to rebuild whole new kernel instead of the 4.9.140-tegra kernel binaries that are being distributed by nvidia?

For the error in dmesg, HW_REV=0xFFFFFFFF is always the problem.

I think it is a platform interaction, with the either Jetson Nano module or Linux kernel PCI/PCIe configuration causing it. Many other PCI register addresses/accesses are already working. (the driver’s register dump output around error condition I included above after a small change in source code)

Others have reported above identical error when trying to us 9260 wifi module with Jetson Nano, which means it is not just my system.

I also have the same error on my system, that’s why I’m participating in this discussion :). I have very limited knowledge about kernel and driver builds however unfortunately.

An Intel 8265NGW wifi module arrived today, and I swapped out 9260. The 8265 worked great out of the box. I noticed different pin positions were populated/used between the two modules. Could that shed some light on what is different platform-wise between the two cards? I’ve attached an image that has the edge pins on the top and bottom of the modules.

(Also it is still a mystery to me how to inline images here on this forum)

Hi,

I don’t think pin difference has anything to do with this issue. Based on the register dump posted on “04/19/2019 09:01 PM”, PCIe configuration space is accessible but BAR0 is not. To access the BAR0, “bus mastering” and “mem/IO space access” should be enabled. pci_enable_device() in iwlwifi should do it.

Can you try below experiments,

  1. Read PCIe config register at offset 0x4 and set bit-0, 1 and 2.
    setpci -s 0000.00:01.0 0x4.w #Get val
    setpci -s 0000.00:01.0 0x4.w=<|0x7> #Take val read from previous cmd & set last 3 bits and write
    setpci -s 0000.01:00.0 0x4.w #Get val
    setpci -s 0000.01:00.0 0x4.w=<|0x7> #Take val read from previous cmd & set last 3 bits and write
  2. Now insmod iwlwifi driver.

If you still see issue, check if BAR is accessible using devmem2

  1. Read PCIe config register at offset 0x4 and set bit-0, 1 and 2.
    setpci -s 0000.00:01.0 0x4.w #Get val
    setpci -s 0000.00:01.0 0x4.w=<|0x7> #Take val read from previous cmd & set last 3 bits and write
    setpci -s 0000.01:00.0 0x4.w #Get val
    setpci -s 0000.01:00.0 0x4.w=<|0x7> #Take val read from previous cmd & set last 3 bits and write
  2. Get BAR0 address using following command,
    lspci -s 0000.01:00.0 -vvv | grep “Region 0”
  3. Write to BAR0 and read it back
    devmem2 w #Read BAR0 base address
    devmem2 w 0xdeada5a5 #Write 0xdeada5a5 to BAR0 base address
    devmem2 w #Read BAR0 base address

Please share lspci -vvv output.

  • Manikanta

It seems you are right.
but what can we do about it?
sudo setpci -s 0000:01:00.0 0x4.w
0002

rico@rico-jetson:~$ sudo setpci -s 0000:01:00.0 0x4.w=0007
rico@rico-jetson:~$ sudo setpci -s 0000:01:00.0 0x4.w
0006

rico@rico-jetson:~$ sudo devmem2 13000000 w 0xdeada5a5
/dev/mem opened.
Memory mapped at address 0x7fb0df9000.
Value at address 0xC65D40 (0x7fb0df9d40): 0xEAFFFFFE
Written 0xDEADA5A5; readback 0xEAFFFFFE

lspci -vvv
01:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
Subsystem: Intel Corporation Device 0010
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 84
Region 0: Memory at 13000000 (64-bit, non-prefetchable)
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [40] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr+ UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L1, Exit Latency L0s <4us, L1 <8us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range B, TimeoutDis+, LTR+, OBFF Via WAKE#
DevCtl2: Completion Timeout: 16ms to 55ms, TimeoutDis-, LTR-, OBFF Disabled
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [80] MSI-X: Enable- Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00003000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [14c v1] Latency Tolerance Reporting
Max snoop latency: 0ns
Max no snoop latency: 0ns
Capabilities: [154 v1] L1 PM Substates
L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
PortCommonModeRestoreTime=30us PortTPowerOnTime=18us
L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
T_CommonMode=0us LTR1.2_Threshold=0ns
L1SubCtl2: T_PwrOn=10us
Kernel modules: iwlwifi

Hi,

You have to prepend “0x” to provide BAR0 base address in hex, i.e sudo devmem2 0x13000000 w 0xdeada5a5.

I see that iwlwifi driver is binded to Intel 9260 PCIe device. Is driver working after enabling the “bus master” and “memory access” using setpci? If yes, then you have to add pci_enable_device() in iwl_pci_probe().

Please share output of commands “sudo lspci -s 0000.00:01.0 -vvv” and “sudo lspci -s 0000.01:00.0 -vvv”.

Thanks,
Manikanta