QCN9074 doesn't initialize on x86-64

I've replaced my QCA9984 with QCN9074, but so far unable to get it to actually work.

My setup is a bit unusual in that I'm using Wallys DR9074-6E on x86-64 and OpenWRT runs in a VM (cards Wi-Fi cards are sent to it with vfio).

While QCA9880 (still connected to VM and works great) and QCA9984 (just replaced) worked great, QCN9074 doesn't seem to initialize properly, but I'm not sure why.

I have installed ath11k-firmware-qcn9074 and kmod-ath11k-pci packages.

Here is kernel logs:

[    6.168990] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0xfc600000-0xfc7fffff 64bit]
[    6.182193] ath11k_pci 0000:01:00.0: MSI vectors: 1
[    6.186952] ath11k_pci 0000:01:00.0: qcn9074 hw1.0
[    6.187843] ath11k_pci 0000:01:00.0: FW memory mode: 2
[    6.344359] ath11k_pci 0000:01:00.0: failed to set pcie link register 0x01e0e0a8: 0xffffffff != 0x00000010
[    6.345731] ath11k_pci 0000:01:00.0: failed to set sysclk: -110
[    6.386927] ath11k_pci 0000:01:00.0: link down error during global reset
[    6.399508] mhi mhi0: BHI offset: 0xffffffff is out of range: 0x200000
[    6.401949] ath11k_pci 0000:01:00.0: failed to prepare mhi: -22
[    6.403109] ath11k_pci 0000:01:00.0: failed to start mhi: -22
[    6.404164] ath11k_pci 0000:01:00.0: failed to power up :-22
[    6.435324] ath11k_pci 0000:01:00.0: failed to create soc core: -22
[    6.436631] ath11k_pci 0000:01:00.0: failed to init core: -22
[    6.868277] ath11k_pci: probe of 0000:01:00.0 failed with error -22

Initially was on snapshot from 2023-05-15, then tried 23.05.0-rc1 that didn't even boot fully and now I'm on today's snapshot (2023-06-17), which does boot properly, but fails to initialize as shown above.

Let me know if there is any other information I can provide

Please try to use it from OpenWrt on the bare iron, without virtualization - temporarily booting it from a USB stick (without touching your installed hypervisor) is fine.

Easier said than done. I have a bunch of VMs there (KVM, host is Alpine Linux), one of which is DHCP server for OpenWRT and a source of Internet connectivity (2 ISPs which comes via different VLANs on the same physical interface), OpenWRT is acting as relatively dumb Access Point.

It'll be not so trivial to do (OpenWRT doesn't ship with packages for this hardware out of the box, so I ideally need Internet to install those packages after boot), hopefully there is something else I can do before that.

This is the first time I have difficulty of this kind with Wi-Fi adapter, usually when it boots and correct firmware is installed it works.

https://www.spinics.net/lists/linux-wireless/msg224988.html seems related, not sure which kernel it was included in, maybe not in the old 5.15 that OpenWRT uses and needs to be backported?

OpenWrt 23.05/ master are using kernel v6.1 based backports for the wireless subsystem and -drivers, which include wifi: ath11k: Fix register write failure on QCN9074.

1 Like

I see, must be something else then :thinking:

Tried Ubuntu 23.04 VM with stock 6.2 kernel, similar results :thinking:

[   10.089665] ath11k_pci 0000:04:00.0: BAR 0: assigned [mem 0xf9400000-0xf95fffff 64bit]
[   10.110250] ath11k_pci 0000:04:00.0: MSI vectors: 1
[   10.110940] ath11k_pci 0000:04:00.0: qcn9074 hw1.0
[   10.128001] NET: Registered PF_QIPCRTR protocol family
[   10.279179] ath11k_pci 0000:04:00.0: failed to set pcie link register 0x01e0e0a8: 0xffffffff != 0x00000010
[   10.279185] ath11k_pci 0000:04:00.0: failed to set sysclk: -110
[   10.319515] ath11k_pci 0000:04:00.0: link down error during global reset
[   10.331076] mhi mhi0: BHI offset: 0xffffffff is out of range: 0x200000
[   10.331089] ath11k_pci 0000:04:00.0: failed to prepare mhi: -22
[   10.331091] ath11k_pci 0000:04:00.0: failed to start mhi: -22
[   10.331093] ath11k_pci 0000:04:00.0: failed to power up :-22
[   10.345656] ath11k_pci 0000:04:00.0: failed to create soc core: -22
[   10.345674] ath11k_pci 0000:04:00.0: failed to init core: -22
[   10.540313] ath11k_pci: probe of 0000:04:00.0 failed with error -22

Interesting, it worked on Alpine Linux host with kernel 6.3.0:

[15880.721108] ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0xdf600000-0xdf7fffff 64bit]
[15880.722854] ath11k_pci 0000:05:00.0: MSI vectors: 16
[15880.722861] ath11k_pci 0000:05:00.0: qcn9074 hw1.0
[15880.729125] NET: Registered PF_QIPCRTR protocol family
[15880.888795] mhi mhi0: Requested to power ON
[15880.888804] mhi mhi0: Power on setup success
[15881.021214] mhi mhi0: Wait for device to enter SBL or Mission mode
[15881.572266] ath11k_pci 0000:05:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa2 soc_id 0xffffffff
[15881.572283] ath11k_pci 0000:05:00.0: fw_version 0x250a04b8 fw_build_timestamp 2021-12-20 06:41 fw_build_id 

Not sure how likely it is related to the kernel, will try newer kernel in the VM.

After driver loaded on the host OS, VM behaves differently:

[    6.117987] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0xfc600000-0xfc7fffff 64bit]
[    6.136995] ath11k_pci 0000:01:00.0: MSI vectors: 1
[    6.138325] ath11k_pci 0000:01:00.0: qcn9074 hw1.0
[    6.139120] ath11k_pci 0000:01:00.0: FW memory mode: 2
[    6.300925] mhi mhi0: Requested to power ON
[    6.301945] mhi mhi0: Power on setup success
[    6.474052] mhi mhi0: Wait for device to enter SBL or Mission mode
[    6.818322] kmodloader: done loading kernel modules from /etc/modules.d/*
[    6.842030] ath11k_pci 0000:01:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa2 soc_id 0xffffffff
[    6.843913] ath11k_pci 0000:01:00.0: fw_version 0x290c8569 fw_build_timestamp 2023-03-25 06:50 fw_build_id
[    7.426195] ath: EEPROM regdomain: 0x8324
[    7.427010] ath: EEPROM indicates we should expect a country code
[    7.429907] ath: doing EEPROM country->regdmn map search
[    7.430921] ath: country maps to regdmn code: 0x3e
[    7.431771] ath: Country alpha2 being used: UA
[    7.432783] ath: Regpair used: 0x3e
[    7.433527] ath: regdomain 0x8324 dynamically updated by user
[    8.298726] ath11k_pci 0000:01:00.0: leaving PCI ASPM disabled to avoid MHI M2 problems
[    9.343586] ath11k_pci 0000:01:00.0: failed to receive control response completion, polling..
[    9.819256] ath10k_pci 0000:04:00.0: pdev param 0 not supported by firmware
[    9.843293] device phy0-ap0 entered promiscuous mode
[   10.383573] ath11k_pci 0000:01:00.0: Service connect timeout
[   10.384445] ath11k_pci 0000:01:00.0: failed to connect to HTT: -110
[   10.385551] ath11k_pci 0000:01:00.0: failed to start core: -110

Looks like upstream bug to me right now, reported here: https://bugzilla.kernel.org/show_bug.cgi?id=217570

Not sure if related but I have a similar problem.
It seems support for QC9074 is far from ready.

I used master for test.

[  410.888840] ath11k_pci 0000:02:00.0: BAR 0: assigned [mem 0xb4200000-0xb43fffff 64bit]
[  410.890548] ath11k_pci 0000:02:00.0: MSI vectors: 16
[  410.891703] ath11k_pci 0000:02:00.0: qcn9074 hw1.0
[  410.892835] ath11k_pci 0000:02:00.0: FW memory mode: 2
[  411.050231] mhi mhi0: Requested to power ON
[  411.051501] mhi mhi0: Power on setup success
[  411.248096] mhi mhi0: Wait for device to enter SBL or Mission mode
[  411.466362] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.480032] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.481857] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.482896] ath11k_pci 0000:02:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa1 soc_id 0xffffffff
[  411.484804] ath11k_pci 0000:02:00.0: fw_version 0x290c8569 fw_build_timestamp 2023-03-25 06:50 fw_build_id
[  411.488932] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.490993] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.498998] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.501327] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.507835] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.509682] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.516587] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.518506] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.525270] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.527184] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.534041] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.536064] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.543466] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.545480] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.564275] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.567140] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.581318] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.586676] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.611177] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.612932] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.618758] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.620433] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.656483] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.658967] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.692130] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.698622] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.724800] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.731252] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.757565] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.763857] kmodloader: done loading kernel modules from /etc/modules.d/*
[  411.790151] kmodloader: loading kernel modules from /etc/modules.d/*
[  411.796419] kmodloader: done loading kernel modules from /etc/modules.d/*
[  413.958073] ath11k_pci 0000:02:00.0: Service connect timeout
[  413.961838] ath11k_pci 0000:02:00.0: failed to connect to HTT: -110
[  413.964123] ath11k_pci 0000:02:00.0: failed to start core: -110
[  424.358045] ath11k_pci 0000:02:00.0: failed to wait wlan mode request (mode 4): -110
[  424.362037] ath11k_pci 0000:02:00.0: qmi failed to send wlan mode off: -110

Interesting, looks somewhat similar. I'm running snapshot from June 30th right now, used June 16th before that.

Manufacturer told me that their customers had success with these cards and OpenWRT, but I have no idea how they used it and whether it was an upstream version or some fork.

We're screwed! :frowning:

Maybe create a bug report then? My use case is more exotic and I assume you run it on bare metal, so must be a valid bug report.

1 Like

Yeah, using bare metal x86, will try to file a bug.

Please post a link to it when you do, I'd like to follow the discussion there.

1 Like

I suggest avoid buying cards from this supplier while there are trusted Qualcomm partners in EU.

The cost difference was significant when I got mine and since my card is basically reference design, I don't think there is much difference between different vendors :person_shrugging:
I used Compex cards in the past, their equivalents look almost identical.

1 Like

Please give this patch a go, it will likely fix the issue:
https://patchwork.kernel.org/project/linux-wireless/patch/20230601033840.2997-1-quic_bqiang@quicinc.com/

2 Likes

Interesting, I'll have to read the docs on how to compile OpenWRT from source first, never done it before.
Will try once I have time for it.

1 Like