From patchwork Fri Nov 22 00:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zoran Davidovac X-Patchwork-Id: 845112 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C3AA18651 for ; Fri, 22 Nov 2024 00:40:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732236027; cv=none; b=LO0LmPp1F/2KX8BfgTm5c0QNKi9ZwkQ4xt7NCX4eUq7G71aDNSv1g6MB/5UO2X5WWMcXA4R+jKhculwKURW8PGdjK4d4z2JPC0h2+8jRm1Sc/dWtipgo/O/cKi97HiQpbWNsHr3dpAie13U2tCdcGrz2YU2gjsH8IZMq4uKZpVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732236027; c=relaxed/simple; bh=koAmQyQVMbACzJzlAU/wukCgyoHbYjxGC3taTiVhzh4=; h=Content-Type:Message-ID:Date:MIME-Version:From:Subject:To: References:In-Reply-To; b=dN5llyt3oGjJnEwclopFzAvdArpf2Tf1Z0u2rscdio6vecYL0RzYGsY9D1Mgqd5PkQReMg1Cw/nhtD/Xay7xa9HTcCt9phfQst/LitniwnKp3MFfYG3KfHii9AreTYWGA0sBLe/aYj+iVy6T3xewyq4yAjaPsJFcqN39NLyveRo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OeZdTVg9; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OeZdTVg9" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a9f1d76dab1so263148766b.0 for ; Thu, 21 Nov 2024 16:40:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732236022; x=1732840822; darn=vger.kernel.org; h=in-reply-to:content-language:references:to:subject:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=DOZ70VEtJJoR6bb59SHJ8Mi28at0V21g7r61VNydUEg=; b=OeZdTVg9lHVIfXdEfEqMglZbDmgP8od5e/40oETFPzRhzmGyM9fsqbYXLikEtg7loP XZWqKNIQZsDDBst+93X/LP4WUqO3BhC3AVQmTA3Eh0zoExzvu097Io2mj1UbhvssX9Ud 8Ld/l3zaZ6lcPL6WyuS4hNJ7OQwdjnWXshnDN7/3Kcr+8AZ+H6pSio5ycDywBlxH6GrO Fo6sOVPM3z/UDgUyRMkHef2ie8lz4QIbQKNEIJI2KWhbL3fo4Y7XxByXmTjdvBkFEWQb F1ysFnuCH7PELxjom6LDHUTH/RWAcAz4WZ9T5Hhldp2RC1RmaylFWIAU80IcBMccbhFh frlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732236022; x=1732840822; h=in-reply-to:content-language:references:to:subject:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=DOZ70VEtJJoR6bb59SHJ8Mi28at0V21g7r61VNydUEg=; b=SStn8MdWGac/USlgdJpX49rB33mclNo0s/sTTYtJ4MdinGHUav80fA1ZaCTEBL1l7c VO4RiFcfdBDeNCL91dkBsGmE6+2Ix0Y9Xwhr2r3nHqO9hA+zZdXO1sj0SqKC0ch5nteb LYmHHEXpspG4AikOiKWzjTwytuW3pBpvEm+ejyqGIGb3pPHvRuGmqSV5FK46r9A/2/6m m0yBZnL1IJGDlZYeKYwXgLGnAxNQztpx9kPiO2hHdr/31qA9JNXRy62mVsBxMAA397aC rZXQpnvcwWq8D8NXhU/d10IaWzePqmSuNSrTQePJVBAvTzuY0TkSGL7dkquKiFVmLsNX GMJA== X-Gm-Message-State: AOJu0Yz70CsrFqwYc7QjU5rO5mEtNx+FKibsbnP/cI72zdCBCgw+HrQe jloWGOMweTCDqxnuL+hp6LR+DtOFrkD+iZz3QjWLa6BwZAhg5pAOI7eU+w== X-Gm-Gg: ASbGnctN22LBT5KuX5Kj+wAhhrE40HW1dmL3xEl6g2vjCEnSskVEFQIFwZ+46EE3YMH SoCLEK49fIlYaNcs4Yf2S8kYwy7jpxAvPhcm3y0fDGUlykYN1DxLLGtwIYY87zOTu88qjHXB43V DpehjLZ8Eu5FgnZaxxEld7jk+gynU3NSBM2/M8aQdBFOiQ7sINqnokTYSVzfcW06fzUjlABHzIv ZhD5iQnNqzofyvZYTAnBUy7RUm21m9DWw8PFCUBt/wZJhHIuF0kFHOX+ysBqLMbp1UfJj5NmgV+ fzw/c/jjVnZd3tPIlH7cZd3DBijQt/V4jcPkbnytYdFrrg== X-Google-Smtp-Source: AGHT+IE3OODK3+e61VY4Tvmufm0fm2lZ7Tm4J7MLEW21FGGom+tDPBTcKQAT/Y+bjxvgaTTYkWYElQ== X-Received: by 2002:a17:906:9d2:b0:aa5:b32:6966 with SMTP id a640c23a62f3a-aa50b327982mr70736666b.50.1732236021789; Thu, 21 Nov 2024 16:40:21 -0800 (PST) Received: from [172.23.31.140] (cable-188-2-10-66.dynamic.sbb.rs. [188.2.10.66]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa50b28f88bsm29304066b.2.2024.11.21.16.40.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2024 16:40:19 -0800 (PST) Message-ID: Date: Fri, 22 Nov 2024 01:40:17 +0100 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Zoran Davidovac Subject: Regression "Direct Firmware loading for Intel Wi-Fi 6 AX201 (rev 30) QuZ-a0-hr-b0-77 failed" To: linux-wireless@vger.kernel.org, Stanislav Yakovlev , Miri Korenblit , Johannes Berg References: Content-Language: en-US In-Reply-To: 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 > > --- 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)); + + + + + + + + + + + + + + + + + + + + + + + + + + +