I am trying to compile qmi_wwan_q driver (ver. 1.2.6) for Nvidia Jetson Orin Nano and I am getting the following error
ERROR: modpost: “rmnet_nss_callbacks” [/home/cm_v2/lemvos/5g/qmi_wwan_q/qmi_wwan_q.ko] undefined!
ERROR: modpost: “usb_cdc_wdm_register” [/home/cm_v2/lemvos/5g/qmi_wwan_q/qmi_wwan_q.ko] undefined!
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.15.136-tegra/build M=/home/cm_v2/lemvos/5g/qmi_wwan_q modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.136-tegra-ubuntu22.04_aarch64/3rdparty/canonical/linux-jammy/kernel-source'
CC [M] /home/cm_v2/lemvos/5g/qmi_wwan_q/qmi_wwan_q.o
MODPOST /home/cm_v2/lemvos/5g/qmi_wwan_q/Module.symvers
ERROR: modpost: "rmnet_nss_callbacks" [/home/cm_v2/lemvos/5g/qmi_wwan_q/qmi_wwan_q.ko] undefined!
ERROR: modpost: "usb_cdc_wdm_register" [/home/cm_v2/lemvos/5g/qmi_wwan_q/qmi_wwan_q.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:133: /home/cm_v2/lemvos/5g/qmi_wwan_q/Module.symvers] Error 1
make[2]: *** Deleting file '/home/cm_v2/lemvos/5g/qmi_wwan_q/Module.symvers'
make[1]: *** [Makefile:1830: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.136-tegra-ubuntu22.04_aarch64/3rdparty/canonical/linux-jammy/kernel-source'
make: *** [Makefile:28: default] Error 2
It does work in the previous releases of Jetson LInux based on 5.10 LTS.
Is there a new version of qmi_wwan_Q driver? or do I need to install anything else?
Please help!
Thank you!
it has nothing to do with the qmi_wwan_q.c.
You don’t need the rmnet_nss_callbacks.
For the usb_cdc_wdm_register, make sure that the cdc_wdm is buillt in already.
bnbhat
July 1, 2024, 12:24pm
3
Thank you for the replay.
I’m getting the same error “rmnet_nss_callbacks” is missing, with pcie_mhi driver as well.
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC [M] drivers/pcie_mhi/core/mhi_dtr.o
CC [M] drivers/pcie_mhi/core/mhi_pm.o
CC [M] drivers/pcie_mhi/controllers/mhi_qti.o
CC [M] drivers/pcie_mhi/devices/mhi_uci.o
CC [M] drivers/pcie_mhi/core/mhi_boot.o
CC [M] drivers/pcie_mhi/core/mhi_main.o
CC [M] drivers/pcie_mhi/core/mhi_init.o
CC [M] drivers/pcie_mhi/devices/mhi_netdev_quectel.o
LD [M] drivers/pcie_mhi/pcie_mhi.o
make[2]: *** Deleting file 'modules-only.symvers'
MODPOST modules-only.symvers
ERROR: modpost: "rmnet_nss_callbacks" [drivers/pcie_mhi/pcie_mhi.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:133: modules-only.symvers] Error 1
make[1]: *** [Makefile:1830: modules] Error 2
make: *** [Makefile:32: kernel] Error 2
Do I need to enable anything else for pcie_mhi?
How can I solve this error?
Thank you!
Is it Qualcomm IPQ OpenWrt?
bnbhat
July 1, 2024, 12:35pm
5
I am trying to use it with Nvidia Jetson Device running Jetson Linux 36.3 (linux 5.15.136 based)
As I know, there is MHI driver in the Linux kernel. We should remove the mhi driver first.
I have removed it, But I still get the same error.
Please check the source code provided by Quectel.
You can debug the Quectel source code.
Thank you for the reply.
In the default config provided by nvidia in jetson linux 36.3,
following are set to ‘y’
CONFIG_PINCTRL_IPQ8074=y
CONFIG_PINCTRL_IPQ6018=y
This is making it to fail, as the rmnet_nss_callbacks is not defined.
Should i just remove this part?
Yes. If it is not IPQ I think you should not add it.
bnbhat
July 9, 2024, 12:02pm
11
I managed to compile and load it. but it is not completely functional.
[ 104.259041] mhi_init Quectel_Linux_PCIE_MHI_Driver_V1.3.6
[ 104.259618] mhi_q 0007:01:00.0: Adding to iommu group 6
[ 104.259702] mhi_pci_probe pci_dev->name = 0007:01:00.0, domain=7, bus=1, slot=0, vendor=17CB, device=0308
[ 104.261335] [I][mhi0][mhi_arch_set_bus_request] Setting bus request to index 1
[ 104.261352] mhi_q 0007:01:00.0: BAR 0: assigned [mem 0x3228000000-0x3228000fff 64bit]
[ 104.262797] mhi_q 0007:01:00.0: enabling device (0000 → 0002)
[ 104.263367] [I][mhi0][mhi_init_pci_dev] msi_required = 4, msi_allocated = 4, msi_irq = 270
[ 104.263389] [I][mhi0][mhi_power_up] dev_state:RESET
[ 104.263392] [I][mhi0][mhi_async_power_up] Requested to power on
[ 104.263465] [I][mhi0][mhi_alloc_coherent] size = 98304, dma_handle = fffc0000
[ 104.263469] [I][mhi0][mhi_init_dev_ctxt] mhi_ctxt->ctrl_seg = 00000000b9bf42f8
[ 104.263731] [I][mhi0][mhi_async_power_up] dev_state:RESET ee:AMSS
[ 104.263748] [I][mhi0][mhi_pm_st_worker] Transition to state:READY
[ 104.263756] [I][mhi0][mhi_pm_st_worker] INVALID_EE → AMSS
[ 104.263758] [I][mhi0][mhi_ready_state_transition] Waiting to enter READY state
[ 104.263806] [I][mhi0][mhi_async_power_up] Power on setup success
[ 104.263892] [I][mhi0][mhi_pci_show_link] LnkCap: Speed 16GT/s, Width x2
[ 104.263894] [I][mhi0][mhi_pci_show_link] LnkSta: Speed 8GT/s, Width x1
[ 104.263896] [I][mhi0][mhi_pci_probe] Return successful
[ 107.507753] [I][mhi0][mhi_ready_state_transition] Device in READY State
[ 107.507766] [I][mhi0][mhi_tryset_pm_state] Transition to pm state from:POR to:POR
[ 107.507774] [I][mhi0][mhi_init_mmio] Initializing MMIO
[ 107.507781] [I][mhi0][mhi_init_mmio] CHDBOFF:0x300
[ 107.507790] [I][mhi0][mhi_init_mmio] ERDBOFF:0x700
[ 107.507794] [I][mhi0][mhi_init_mmio] Programming all MMIO values.
$ ls /dev/mhi*
/dev/mhi_BHI
cm_v2@AP003:~/Linux_Android_Drivers_Tools/ConnectManager/Quectel_QConnectManager_Linux_V1.6.5$ sudo ./quectel-CM
[07-09_12:04:13:228] QConnectManager_Linux_V1.6.5
[07-09_12:04:13:230] network interface ‘’ or qmidev ‘’ is not exist
[07-09_12:04:13:230] atdevice_detect failed
[07-09_12:04:13:230] qmidevice_detect failed
What could be wrong here?
What is the Linux kernel version?
bnbhat
July 9, 2024, 12:12pm
14
you can find it in the file below.
interrupts.txt (15.7 KB)
From the log I didn’t see anything abormal.
But there is no interrupts
270: 0 0 0 0 0 0 PCI-MSI 940048384 Edge mhi
271: 0 0 0 0 0 0 PCI-MSI 940048385 Edge mhi
272: 0 0 0 0 0 0 PCI-MSI 940048386 Edge mhi
273: 0 0 0 0 0 0 PCI-MSI 940048387 Edge mhi
bnbhat
July 9, 2024, 12:26pm
17
Sorry for the delay, forum only allows me to reply after 5mins.
0007:00:00.0 PCI bridge: NVIDIA Corporation Device 229a (rev a1) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 195, IOMMU group 6
Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
I/O behind bridge: [disabled]
Memory behind bridge: 40000000-400fffff [size=1M]
Prefetchable memory behind bridge: [disabled]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [70] Express Root Port (Slot-), 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: [190] Lane Margining at the Receiver <?>
Capabilities: [1c0] L1 PM Substates
Capabilities: [1d0] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
Capabilities: [2d0] Vendor Specific Information: ID=0001 Rev=1 Len=038 <?>
Capabilities: [308] Data Link Feature <?>
Capabilities: [314] Precision Time Measurement
Capabilities: [320] Vendor Specific Information: ID=0004 Rev=1 Len=054 <?>
Capabilities: [388] Vendor Specific Information: ID=0006 Rev=0 Len=018 <?>
Kernel driver in use: pcieport
Kernel modules: tegra_pcie_dma_test
0007:01:00.0 Unassigned class [ff00]: Qualcomm Device 0308
Subsystem: Qualcomm Device 5201
Flags: bus master, fast devsel, latency 0, IRQ 270, IOMMU group 6
Memory at 3228000000 (64-bit, non-prefetchable) [size=4K]
Memory at 3228001000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=4/32 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
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: [19c] Transaction Processing Hints
Capabilities: [228] Latency Tolerance Reporting
Capabilities: [230] L1 PM Substates
Capabilities: [240] Data Link Feature <?>
Kernel driver in use: mhi_q
Kernel modules: pcie_mhi
The current log still does not show the problem.
You check the power-on timing of the module.
When does the module start to power on, because PCIE devices do not support hot plugging.
bnbhat
July 10, 2024, 7:46am
19
It can be the issue with the power-on timing.
Is the RESET and FULL_CARD_POWER_OFF controlled by driver? or does it need to be externally controlled?
Thank you!