• B
    PCI/ASPM: Save LTR Capability for suspend/resume · dbbfadf2
    Bjorn Helgaas 提交于
    Latency Tolerance Reporting (LTR) allows Endpoints and Switch Upstream
    Ports to report their latency requirements to upstream components.  If ASPM
    L1 PM substates are enabled, the LTR information helps determine when a
    Link enters L1.2 [1].
    
    Software must set the maximum latency values in the LTR Capability based on
    characteristics of the platform, then set LTR Mechanism Enable in the
    Device Control 2 register in the PCIe Capability.  The device can then use
    LTR to report its latency tolerance.
    
    If the device reports a maximum latency value of zero, that means the
    device requires the highest possible performance and the ASPM L1.2 substate
    is effectively disabled.
    
    We put devices in D3 for suspend, and we assume their internal state is
    lost.  On resume, previously we did not restore the LTR Capability, but we
    did restore the LTR Mechanism Enable bit, so devices would request the
    highest possible performance and ASPM L1.2 wouldn't be used.
    
    [1] PCIe r4.0, sec 5.5.1
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=201469Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    dbbfadf2
pci.c 164.4 KB