Bug 219755

Summary: Wifi card intel 7265D not detected with kernel 6.14-rc1
Product: Drivers Reporter: Tasev Nikola (tasev.stefanoska)
Component: PCIAssignee: drivers_pci (drivers_pci)
Status: RESOLVED CODE_FIX    
Severity: normal CC: bjorn
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 6.14-rc1 Subsystem:
Regression: Yes Bisected commit-id: 1db806ec06b7c6e08e8af57088da067963ddf117
Attachments: Dmesg from kernel 6.14-rc1
Dmesg from kernel 6.13
lspci -vv from kernel 6.14-rc1
lspci -vv from kernel 6.13

Description Tasev Nikola 2025-02-06 18:47:21 UTC
Created attachment 307580 [details]
Dmesg from kernel 6.14-rc1

Hi

With kernel 6.14-rc1 my wifi card is not detected anymore on my Asus UX305FA after boot.

Boot dmesg 6.14-rc1:

dmesg | grep iwl
[    4.006347] iwlwifi 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
[    4.008072] iwlwifi 0000:02:00.0: HW_REV=0xFFFFFFFF, PCI issues?
[    4.009912] iwlwifi 0000:02:00.0: probe with driver iwlwifi failed with error -5

Boot dmesg 6.13:

dmesg | grep iwl
[    4.050816] iwlwifi 0000:02:00.0: Detected crf-id 0x0, cnv-id 0x0 wfpm id 0x0
[    4.051026] iwlwifi 0000:02:00.0: PCI dev 095a/5110, rev=0x210, rfid=0xd55555d5
[    4.051034] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265
[    4.071892] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM
[    4.071900] iwlwifi 0000:02:00.0: Found debug configuration: 0
[    4.072394] iwlwifi 0000:02:00.0: loaded firmware version 29.f2390aa8.0 7265D-29.ucode op_mode iwlmvm
[    4.898190] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    4.899728] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor.
[    4.918986] iwlwifi 0000:02:00.0: base HW address: 60:57:18:32:43:12, OTP minor version: 0x0
[    4.999045] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[    6.502130] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    6.587844] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    6.590011] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[    6.604069] iwlwifi 0000:02:00.0: Registered PHC clock: iwlwifi-PTP, with index: 0

I tried to unload/load the iwlwifi driver, set pcie_port_pm=off in grub, disable wifi powermanagment with no succes.

I start bisecting and the first bad commit is:

1db806ec06b7c6e08e8af57088da067963ddf117 is the first bad commit
commit 1db806ec06b7c6e08e8af57088da067963ddf117
Author: Jian-Hong Pan <jhp@endlessos.org>
Date:   Fri Nov 15 15:22:02 2024 +0800

    PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state()

    After 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for
    suspend/resume"), pci_save_aspm_l1ss_state(dev) saves the L1SS state for
    "dev", and pci_restore_aspm_l1ss_state(dev) restores the state for both
    "dev" and its parent.

    The problem is that unless pci_save_state() has been used in some other
    path and has already saved the parent L1SS state, we will restore junk to
    the parent, which means the L1 Substates likely won't work correctly.

    Save the L1SS config for both the device and its parent in
    pci_save_aspm_l1ss_state().  When restoring, we need both because L1SS must
    be enabled at the parent (the Downstream Port) before being enabled at the
    child (the Upstream Port).

    Link: https://lore.kernel.org/r/20241115072200.37509-3-jhp@endlessos.org
    Fixes: 17423360a27a ("PCI/ASPM: Save L1 PM Substates Capability for suspend/resume")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218394
    Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
    [bhelgaas: parallel save/restore structure, simplify commit log, patch at
    https://lore.kernel.org/r/20241212230340.GA3267194@bhelgaas]
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Tested-by: Jian-Hong Pan <jhp@endlessos.org> # Asus B1400CEAE

 drivers/pci/pcie/aspm.c | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)
 
Reverting the patch and rebuild the 6.14-rc1 kernel fixed the problem for me, my wifi card is detected again.

Tasev
Comment 1 Tasev Nikola 2025-02-06 18:50:01 UTC
Created attachment 307581 [details]
Dmesg from kernel 6.13
Comment 2 Tasev Nikola 2025-02-06 18:51:32 UTC
Created attachment 307582 [details]
lspci -vv from kernel 6.14-rc1
Comment 3 Tasev Nikola 2025-02-06 18:52:11 UTC
Created attachment 307583 [details]
lspci -vv from kernel 6.13
Comment 4 Bjorn Helgaas 2025-02-06 19:48:43 UTC
Sorry, Tasev, it looks like this was my fault.  I *think* it should be fixed by Ilpo's patch: https://lore.kernel.org/r/20250131152913.2507-1-ilpo.jarvinen@linux.intel.com

I just asked Linus to pull this for v6.14-rc2.  If that *doesn't* fix it, please let me know and we'll try again.
Comment 5 Tasev Nikola 2025-02-07 08:04:19 UTC
Hi Bjorn
I just tested Ilpo's patch, it works.
Thank you all for your work!