ath10k: "add target IRAM recovery feature support" breaks QCA9984 Firmware load capability
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
You-Sheng Yang | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Won't Fix
|
High
|
You-Sheng Yang | ||
Impish |
Fix Released
|
High
|
You-Sheng Yang | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
linux-oem-5.13 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
High
|
You-Sheng Yang | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[SRU Justification]
[Impact]
Commit 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support")
in v5.11 fails firmware loading without IRAM recovery feature. However,
the latest firmware from
https:/
doesn't support IRAM, it follows new official ath10k firmwares may no
longer be loadable for kernel newer than v5.11.
[Fix]
A fix is proposed to
http://
turns the lack/failure of IRAM recovery support a warning instead.
[Test Case]
With this fix, kernel gives errors about the IRAM supportness, but
proceeds to remaining procedures as before.
ath10k_pci 0000:04:00.0: No hardware memory
ath10k_pci 0000:04:00.0: failed to copy target iram contents: -12
ath10k_pci 0000:07:00.0: No hardware memory
ath10k_pci 0000:07:00.0: failed to copy target iram contents: -12
[Where problems could occur]
So the IRAM recovery feature may or may not be supported in the
officially released firmware, and people meet problems when using
non-IRAM supported firmware may still have a fallback to use older, but
IRAM recovery supported ones.
========== original bug report ==========
Hello, I use Ubuntu 20.04.2 LTS.
The kernel was recently updated to 5.11
5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Since then the ath10k_core driver for my QCA9984 card is broken and only loads ~3 firmware versions from the 3.9.0.2 branch
https:/
The firmware versions 70 / 86 / 91 are functional (but these firmware versions are already 2 years old)
Responsible for this is the defective patch "ath10k: add target IRAM recovery feature support"
If I understand the patch correctly then the driver tries to load firmware with the feature "iram recovery" into the memory of the host (for recvovery purposes).
If this fails, the firmware is discarded and the network controller remains unusable.
Of course, this is not a desirable behavior for optional firmware features.
dmesg:
[ 3.074952] ath: loading out-of-tree module taints kernel.
[ 3.090522] ath: module verification failed: signature and/or required key missing - tainting kernel
[ 3.110879] ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 3.178741] ath10k_pci 0000:04:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 3.229944] ath10k_pci 0000:03:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 3.229948] ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ 3.230274] ath10k_pci 0000:03:00.0: firmware ver 10.4-3.9.0.2-00149 api 5 features no-p2p,
[ 3.291329] ath10k_pci 0000:04:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 3.291333] ath10k_pci 0000:04:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ 3.291678] ath10k_pci 0000:04:00.0: firmware ver 10.4-3.9.0.2-00149 api 5 features no-p2p,
[ 4.463156] ath10k_pci 0000:03:00.0: board_file api 2 bmi_id 0:1 crc32 85498734
[ 4.520649] ath10k_pci 0000:04:00.0: board_file api 2 bmi_id 0:2 crc32 85498734
[ 7.047910] ath10k_pci 0000:03:00.0: failed to copy target iram contents: -12
[ 7.103260] ath10k_pci 0000:03:00.0: could not init core (-12)
[ 7.103267] ath10k_pci 0000:03:00.0: could not probe fw (-12)
[ 7.108570] ath10k_pci 0000:04:00.0: failed to copy target iram contents: -12
[ 7.163247] ath10k_pci 0000:04:00.0: could not init core (-12)
[ 7.163268] ath10k_pci 0000:04:00.0: could not probe fw (-12)
In the ath10k mailing list I found a second patch which makes it possible to load the latest firmware on the card again.
https://<email address hidden>
I have tested the patch and it works.
dmesg:
[18245.610112] ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[18245.674800] ath10k_pci 0000:04:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[18245.731606] ath10k_pci 0000:03:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[18245.731620] ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[18245.733172] ath10k_pci 0000:03:00.0: firmware ver 10.4-3.9.0.2-00152 api 5 features no-p2p,
[18245.790380] ath10k_pci 0000:04:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[18245.790383] ath10k_pci 0000:04:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[18245.790703] ath10k_pci 0000:04:00.0: firmware ver 10.4-3.9.0.2-00152 api 5 features no-p2p,
[18246.963760] ath10k_pci 0000:03:00.0: board_file api 2 bmi_id 0:1 crc32 85498734
[18247.019699] ath10k_pci 0000:04:00.0: board_file api 2 bmi_id 0:2 crc32 85498734
[18249.514054] ath10k_pci 0000:03:00.0: No hardware memory
[18249.514057] ath10k_pci 0000:03:00.0: failed to copy target iram contents: -12
[18249.570423] ath10k_pci 0000:04:00.0: No hardware memory
[18249.570426] ath10k_pci 0000:04:00.0: failed to copy target iram contents: -12
[18249.620637] ath10k_pci 0000:03:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
[18249.678035] ath10k_pci 0000:04:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
Please include this patch in Ubuntu so that we can load current firmware versions on our QCA9984 cards again.
additional reference:
https:/
best regards
CVE References
tags: |
added: amd64 removed: ath10k |
tags: |
added: ath10k removed: amd64 |
tags: | removed: ath10k |
tags: | added: ath10k linux |
tags: | added: amd64 |
tags: | added: qca9984 |
tags: | added: hirsute impish patch |
Changed in linux (Ubuntu): | |
status: | New → Triaged |
Changed in linux-oem-5.13 (Ubuntu Hirsute): | |
status: | New → Invalid |
Changed in linux-oem-5.13 (Ubuntu Impish): | |
status: | New → Invalid |
Changed in linux (Ubuntu Focal): | |
status: | New → Invalid |
Changed in linux-oem-5.13 (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Impish): | |
status: | Triaged → Fix Released |
Changed in linux (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in linux (Ubuntu Jammy): | |
status: | New → Fix Released |
Changed in linux-oem-5.13 (Ubuntu Jammy): | |
status: | New → Invalid |
PPA: https:/ /launchpad. net/~vicamo/ +archive/ ubuntu/ ppa-1939937
Hi, could you help have tests with kernels being built in my ppa? You may do:
$ sudo add-apt-repository ppa:vicamo/ ppa-1939937
linux- image-unsigned- 5.11.0- 2033-generic \
linux- modules- extra-5. 11.0-2033- generic \
linux- headers- 5.11.0- 2033-generic
$ sudo apt-get install \
It may take a few hours from now to complete compiling though.