diff mbox series

Regression "Direct Firmware loading for Intel Wi-Fi 6 AX201 (rev 30) QuZ-a0-hr-b0-77 failed"

Message ID f5c7eb4f-fd8d-457b-92c4-8957f70888b9@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series Regression "Direct Firmware loading for Intel Wi-Fi 6 AX201 (rev 30) QuZ-a0-hr-b0-77 failed" | expand

Commit Message

Zoran Davidovac Nov. 22, 2024, 12:40 a.m. UTC
Hi to all,

Year ago I wrote about problem with that kernels 6.5.X, 6.6.X failure 
with firmware loading QuZ-a0-hr-b0-77.ucode,
either direct loading or with included firmware in 
kernel("CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin 
intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc 
iwlwifi-QuZ-a0-hr-b0-77.ucode"caused kernel reboot) and that kernel 
6.4.X could load firmware direct or included.

Year later It is still the same, but with 6.11.X firmware for 22000 does 
not get loaded:
-first problem from 6.5.X and up to latest 6.11.9 I can not direct load 
firmware  QuZ-a0-hr-b0-77.ucode or included,
-second it does not retry to load older firmware as it was decided to 
bump "wifi: iwlwifi: bump min API version for Qu/So devices"
"#define IWL_22000_UCODE_API_MIN        77" in kernel 6.11.X and
direct loading of  QuZ-a0-hr-b0-77.ucode just fail and it will abort any 
further loading of firmware.
(it will not even try to load next working QuZ-a0-hr-b0-74.ucode) And I 
one would have no working wifi!!!

https://patchwork.kernel.org/project/linux-wireless/patch/20230416154301.e522ccefe354.If7628363fafeb7687163103e734206915c445197@changeid/ 

https://github.com/torvalds/linux/blob/master/drivers/net/wireless/intel/iwlwifi/cfg/22000.c 


vanilla kernel from 6.11.9 log:
[    1.903903] Intel(R) Wireless WiFi driver for Linux
[    1.904006] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[    1.906832] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 
0x20000302 wfpm id 0x80000000
[    1.906890] iwlwifi 0000:00:14.3: PCI dev a0f0/0074, rev=0x351, 
rfid=0x10a100
[    1.906891] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6 AX201 160MHz
...
[    1.907036] iwlwifi 0000:00:14.3: Direct firmware load for 
iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2
[    1.907037] iwlwifi 0000:00:14.3: Falling back to sysfs fallback for: 
iwlwifi-QuZ-a0-hr-b0-77.ucode
...
[   62.970034] cfg80211: failed to load regulatory.db
[   62.970035] iwlwifi 0000:00:14.3: no suitable firmware found!
[   62.970038] iwlwifi 0000:00:14.3: iwlwifi-QuZ-a0-hr-b0-77 is required
[   62.970039] iwlwifi 0000:00:14.3: check 
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

I reverted min API version to 74 (611wifi) patch to be able to use wifi
/* Lowest firmware API version supported */
-#define IWL_22000_UCODE_API_MIN        77
+#define IWL_22000_UCODE_API_MIN        74
Now I get the same behavior as with 6.10.X direct loading of 
QuZ-a0-hr-b0-77.ucode would also fail,
*but* after 60 seconds it would try and fail with 
"iwlwifi-QuZ-a0-hr-b0-76.ucode"and after some tries/time
it would load "iwlwifi-QuZ-a0-hr-b0-74.ucode" and wifi would work!

*Important is while comparing and playing with wifi firmware:*
-1-I found that direct loading of 
/lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode  always fail no matter what 
firmware it is.
I've renamed .74 to .77  and it still failed to load and at that time I 
realized that this is not QuZ-a0-hr-b0-77 firmware problem,
but either card timeout or (direct) firmware loading problem with AX201, 
it is not due disk delay as I've tested this year ago.

-2-kernel 6.4.X worked ok "iwlwifi-QuZ-a0-hr-b0-77.ucode"

-3-problem started with 6.5.X and it still present in 6.11.9!

-4-With 611wifi patch and 
  iwlwifi-QuZ-a0-hr-b0-77.ucode==iwlwifi-QuZ-a0-hr-b0-76.ucode==iwlwifi-QuZ-a0-hr-b0-75.ucode
# md5sum /lib/firmware/iwlwifi-QuZ-a0-hr-b0-7*|tail -n3
bde23ede60857d00768a7f6ca7041cc6 
  /lib/firmware/iwlwifi-QuZ-a0-hr-b0-75.ucode
bde23ede60857d00768a7f6ca7041cc6 
  /lib/firmware/iwlwifi-QuZ-a0-hr-b0-76.ucode
bde23ede60857d00768a7f6ca7041cc6 
  /lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
# ls -all /lib/firmware/iwlwifi-QuZ-a0-hr-b0-7*|tail -n3
-rw-r--r-- 1 root root 1406124 Nov 13 02:43 
/lib/firmware/iwlwifi-QuZ-a0-hr-b0-75.ucode
-rw-r--r-- 1 root root 1406124 Nov 13 02:43 
/lib/firmware/iwlwifi-QuZ-a0-hr-b0-76.ucode
-rw-r--r-- 1 root root 1406124 Nov 14 20:24 
/lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
after failing v77, kernel can retry and manage to load v76 (that is 
actually v77) and this works!

vanilla kernel from 6.11.9+611wifi patch log:
[    0.906238] pci 0000:00:14.3: [8086:a0f0] type 00 class 0x028000 PCIe 
Root Complex Integrated Endpoint
[    0.906276] pci 0000:00:14.3: BAR 0 [mem 0x603f29c000-0x603f29ffff 
64bit]
[    0.906416] pci 0000:00:14.3: PME# supported from D0 D3hot D3cold
[    0.948151] pci 0000:00:14.3: Adding to iommu group 11
[    1.947555] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[    1.950802] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 
0x20000302 wfpm id 0x80000000
[    1.950876] iwlwifi 0000:00:14.3: PCI dev a0f0/0074, rev=0x351, 
rfid=0x10a100
[    1.950887] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6 AX201 160MHz
[    1.951071] iwlwifi 0000:00:14.3: Direct firmware load for 
iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2
[    1.951099] iwlwifi 0000:00:14.3: Falling back to sysfs fallback for: 
iwlwifi-QuZ-a0-hr-b0-77.ucode
[   62.974355] iwlwifi 0000:00:14.3: TLV_FW_FSEQ_VERSION: FSEQ Version: 
89.3.35.37
[  124.410124] iwlwifi 0000:00:14.3: loaded firmware version 
77.0b4c06ad.0 QuZ-a0-hr-b0-76.ucode op_mode iwlmvm
[  124.533571] iwlwifi 0000:00:14.3: Detected RF HR B3, rfid=0x10a100
[  124.598887] iwlwifi 0000:00:14.3: base HW address: cc:15:31:4b:f9:7e
[  124.857428] iwlwifi 0000:00:14.3: Registered PHC clock: iwlwifi-PTP, 
with index: 1


Problems that I see:
-why direct loading fail at first
-when firmware is in kernel ("CONFIG_EXTRA_FIRMWARE="... 
iwlwifi-QuZ-a0-hr-b0-77.ucode") why it is causing just reboots

We know:
-It was working in 6.4.X and right iwlwifi-QuZ-a0-hr-b0-77.ucode was loaded!
-And it may not be problem with firmware as I believed year ago.

(Again) I am using stock vanilla kernel, from kernel.org and compiling 
it with attached config,
distro info:Slackware current x64 :)
my wifi:
0000:00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201 (rev 30)

0000:00:14.3 0280: 8086:a0f0 (rev 30)
       DeviceName: WLAN
       Subsystem: 8086:0074
       Flags: bus master, fast devsel, latency 0, IRQ 19, IOMMU group 11
       Memory at 603f29c000 (64-bit, non-prefetchable) [size=16K]
       Capabilities: [c8] Power Management version 3
       Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
       Capabilities: [40] Express Root Complex Integrated Endpoint, 
IntMsgNum 0
       Capabilities: [80] MSI-X: Enable+ Count=16 Masked-
       Capabilities: [100] Latency Tolerance Reporting
       Capabilities: [164] Vendor Specific Information: ID=0010 Rev=0 
Len=014 <?>
       Kernel driver in use: iwlwifi

Keep up doing great work, and like last time I am offering to do any 
testing, or answer any question.

Kind Regards,

Zoran





On 12/8/23 06:15, Zoran Davidovac wrote:
> Hi,
>
> I've noticed two problems with loading firmware QuZ-a0-hr-b0-7X.ucode 
> and booting  problem,
> probably some another maintainer is in charge for that, please add them.
>
> *1.failure to load QuZ-a0-hr-b0-77.ucode*
> with kernel 6.5.x and 6.6.X 77.bd067429.0 QuZ-a0-hr-b0-77.ucode fails 
> to load, but with 6.4.X loads it fine:
>
> Dec  4 16:25:19 Expert kernel: Linux version 6.4.16-eb-64GB-frm2go 
> (root@Expert.vm) (gcc (GCC) 13.2.0, GNU ld version 2.41-slack151) #1 
> SMP PREEMPT_DYNAMIC Mon Oct 23 02:12:47 CEST 2023
> Dec  4 15:43:43 Expert kernel: iwlwifi 0000:00:14.3: loaded firmware 
> version 77.bd067429.0 QuZ-a0-hr-b0-77.ucode op_mode iwlmvm
>
> Dec  7 10:40:46 Expert kernel: Linux version 6.6.4-eb-64GB-frm2go-a 
> (root@Expert.vm) (gcc (GCC) 13.2.0, GNU ld version 2.41-slack151) #6 
> SMP PREEMPT_DYNAMIC Thu Dec  7 04:57:29 CET 2023
> Dec  7 10:44:53 Expert kernel: iwlwifi 0000:00:14.3: loaded firmware 
> version 74.a5e9588b.0 QuZ-a0-hr-b0-74.ucode op_mode iwlmvm
>
> *2.failure to boot (this should not happened no matter what firmware I 
> include with kernel)*
>
> there is another weird problem if firmware QuZ-a0-hr-b0-77.ucode is  
> included *with kernel 6.5.X and 6.6.X* it restart itself at boot
>
>
> To explain a bit why and what I've tried:
> why:I did not want to wait for right firmware to load and wanted to 
> have working Wifi at boot
> so I've compiled custom kernel for personal use that have built in the 
> following firmware in kernel 6.4.16
> CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin intel/ibt-19-0-4.sfi 
> intel/ibt-19-0-4.ddc iwlwifi-QuZ-a0-hr-b0-77.ucode"
>
> Now with kernel 6.5.X I've noticed upon boot instant reboots, but I 
> did not had time to debug the problem,
> same is with 6.6.3 and 6.6.4, but now I had to debug and I've found 
> the following:
>
>
> -2.1. no booting problem with CONFIG_EXTRA_FIRMWARE=""
>
> and returning back firmware (one by one and compiling) I found out 
> that  with CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin 
> intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc" works
>
> but not booting with CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin 
> intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc iwlwifi-QuZ-a0-hr-b0-77.ucode"
>
> -2.2.Debugging: I've tried the following as I've noticed firmware have 
> changed:
> cc0698c4b69c7b495f4bbee16dbd141f 
>  ./intel/linux-firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
> 3f2db8edac740f501e67121842b539dc 
>  ./intel/915/linux-firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
> 3f2db8edac740f501e67121842b539dc 
>  /lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
>
> also on git 
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/iwlwifi-QuZ-a0-hr-b0-77.ucode?id=4fc5801ee0e7d41d945a8a6c06e0542ec9fa47e0
>
> but with none of iwlwifi-QuZ-a0-hr-b0-77.ucode  is not working with 
> 6.5.X and 6.6.X
>
> -2.3. with kernel compiled without any iwlwifi-QuZ-a0-hr-b0-7X.ucode 
> firmware (CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin 
> intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc" or "")
> kernel 6.4.14 is working with  firmware iwlwifi-QuZ-a0-hr-b0-77.ucode 
> while 6.6.4 fall loads only QuZ-a0-hr-b0-74.ucode
>
> root@Expert:/usr/src/asus/book# less /var/log/messages |grep -i "linux 
> version\|QuZ-a0-hr-b0-7"
> Dec  4 16:25:19 Expert kernel: Linux version 6.4.16-eb-64GB-frm2go 
> (root@Expert.vm) (gcc (GCC) 13.2.0, GNU ld version 2.41-slack151) #1 
> SMP PREEMPT_DYNAMIC Mon Oct 23 02:12:47 CEST 2023
> Dec  4 16:26:38 Expert kernel: Linux version 6.4.16-eb-64GB-frm2go 
> (root@Expert.vm) (gcc (GCC) 13.2.0, GNU ld version 2.41-slack151) #1 
> SMP PREEMPT_DYNAMIC Mon Oct 23 02:12:47 CEST 2023
> ...
> Dec  7 10:40:46 Expert kernel: Linux version 6.6.4-eb-64GB-frm2go-a 
> (root@Expert.vm) (gcc (GCC) 13.2.0, GNU ld version 2.41-slack151) #6 
> SMP PREEMPT_DYNAMIC Thu Dec  7 04:57:29 CET 2023
> Dec  7 10:44:53 Expert kernel: iwlwifi 0000:00:14.3: loaded firmware 
> version 74.a5e9588b.0 QuZ-a0-hr-b0-74.ucode op_mode iwlmvm
>
>
> I am available If I can do any test, problem is detected on "Product 
> Name: ASUS EXPERTBOOK B7402FEA_B7402FEA"
>
>
> Regards,
>
>
>  Zoran
>
>

Comments

Johannes Berg Nov. 22, 2024, 8:36 a.m. UTC | #1
Hi,

Sorry, what, I'm confused.

> it will not even try to load next working QuZ-a0-hr-b0-74.ucode


That's intentional... We released -77 firmware for this device in 2022,
a little over two years ago. We can't and won't support ancient firmware
*forever*. We've already supported it for a very long time.

> either direct loading or with included firmware in kernel
> ("CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc iwlwifi-QuZ-a0-hr-b0-77.ucode"
> caused kernel reboot) and that kernel 6.4.X could load
> firmware direct or included.

I have no idea what might be the issue here. Perhaps your kernel ends up
too big for the way you're booting it? If you insist on booting without
initramfs but with iwlwifi built-in, you need to debug and fix *this*.
Or I guess you could always try probing/binding the driver again after
the system really boots.

>  vanilla kernel from 6.11.9 log: 
>  [    1.903903] Intel(R) Wireless WiFi driver for Linux 
>  [    1.904006] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002) 
>  [    1.906832] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000 
>  [    1.906890] iwlwifi 0000:00:14.3: PCI dev a0f0/0074, rev=0x351, rfid=0x10a100 
>  [    1.906891] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6 AX201 160MHz 
>  ...
>  [    1.907036] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2 

but I guess that's when you try to have wifi built-in and no firmware
built-in

johannes
Zoran Davidovac Nov. 22, 2024, 3:45 p.m. UTC | #2
Hi,

I am telling you that *initial direct loading is broken*!

Direct loading of v77 firmware, when ax201 is built in kernel is 
broken!  This worked in kernel 6.4.x year ago.

Proof to that is if I copy .77 to .76 and I use my patch *just to repeat 
direct loading* of next file, and 60 seconds later it actually loads v77 
firmware that is named .76.ucode and this works.

That also tell us that current firmware v77 is ok!

Hope that that explains what problem is.

I can debug more if needed, but I am not programmer and It would need 
substantial more time to find why initial direct loading fails and how 
to fix it.

Kind Regards,

Zoran



On 11/22/24 09:36, Johannes Berg wrote:
> Hi,
>
> Sorry, what, I'm confused.
>
>> it will not even try to load next working QuZ-a0-hr-b0-74.ucode
>
> That's intentional... We released -77 firmware for this device in 2022,
> a little over two years ago. We can't and won't support ancient firmware
> *forever*. We've already supported it for a very long time.
>
>> either direct loading or with included firmware in kernel
>> ("CONFIG_EXTRA_FIRMWARE="i915/tgl_dmc_ver2_12.bin intel/ibt-19-0-4.sfi intel/ibt-19-0-4.ddc iwlwifi-QuZ-a0-hr-b0-77.ucode"
>> caused kernel reboot) and that kernel 6.4.X could load
>> firmware direct or included.
> I have no idea what might be the issue here. Perhaps your kernel ends up
> too big for the way you're booting it? If you insist on booting without
> initramfs but with iwlwifi built-in, you need to debug and fix *this*.
> Or I guess you could always try probing/binding the driver again after
> the system really boots.
>
>>   vanilla kernel from 6.11.9 log:
>>   [    1.903903] Intel(R) Wireless WiFi driver for Linux
>>   [    1.904006] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
>>   [    1.906832] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000
>>   [    1.906890] iwlwifi 0000:00:14.3: PCI dev a0f0/0074, rev=0x351, rfid=0x10a100
>>   [    1.906891] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6 AX201 160MHz
>>   ...
>>   [    1.907036] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-hr-b0-77.ucode failed with error -2
> but I guess that's when you try to have wifi built-in and no firmware
> built-in
>
> johannes
diff mbox series

Patch

--- linux-6.11.7/drivers/net/wireless/intel/iwlwifi/cfg/22000.c	2024-11-08 16:31:04.000000000 +0100
+++ linux-6.11.5/drivers/net/wireless/intel/iwlwifi/cfg/22000.c	2024-10-28 06:46:16.690019923 +0100
@@ -13,7 +13,7 @@ 
 #define IWL_22000_UCODE_API_MAX	77
 
 /* Lowest firmware API version supported */
-#define IWL_22000_UCODE_API_MIN	77
+#define IWL_22000_UCODE_API_MIN	74
 
 /* NVM versions */
 #define IWL_22000_NVM_VERSION		0x0a1d
@@ -426,3 +426,30 @@ 
 MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+