https://bugzilla.kernel.org/show_bug.cgi?id=220705

--- Comment #16 from Lukas Wunner ([email protected]) ---
After staring at the code for a few hours I've noticed that
pcie_config_aspm_link() contains this:

        /* Spec says both ports must be in D0 before enabling PCI PM
substates*/
        if (parent->current_state != PCI_D0 || child->current_state != PCI_D0)
{
                state &= ~PCIE_LINK_STATE_L1_SS_PCIPM;
                state |= (link->aspm_enabled & PCIE_LINK_STATE_L1_SS_PCIPM);
        }

When the devices are enumerated on boot, pci_setup_device() initializes
current_state to PCI_UNKNOWN.

Commit 4d4c10f763d7 changed the behavior such that current_state now reflects
the actual state, which is D0 for both the Root Port and the wifi card. Before
the commit, the if-condition was likely dead code for all boot-time invocations
of pcie_config_aspm_link().

pcie_config_aspm_link() is invoked via pcie_aspm_init_link_state() ->
pcie_config_aspm_path().

Note that in the failing case (current mainline, with 4d4c10f763d7), lspci
output shows PCI-PM_L1.2- PCI-PM_L1.1- in L1SubCtl1 of the Root Port, which
seems to validate this theory.

I've yet to understand what's causing the wifi card to fall off the bus, need
to stare at code some more. But at least this is a plausible theory why
4d4c10f763d7 introduced a change of behavior.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to