PCI: Fix up L1SS capability for Intel Apollo Lake Root Port
authorRon Lee <ron.lee.intel@gmail.com>
Tue, 11 Apr 2023 16:02:13 +0000 (00:02 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 11 Apr 2023 18:06:06 +0000 (13:06 -0500)
commit606012dddebbc4123d51a2223e2b26ed6c746696
tree6137b6ddaeb3de24afbed0d2f3e795ee94c11cac
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
PCI: Fix up L1SS capability for Intel Apollo Lake Root Port

On Google Coral and Reef family Chromebooks with Intel Apollo Lake SoC,
firmware clobbers the header of the L1 PM Substates capability and the
previous capability when returning from D3cold to D0.

Save those headers at enumeration-time and restore them at resume.

[bhelgaas: The main benefit is to make the lspci output after resume
correct.  Apparently there's little or no effect on power consumption.]

Link: https://lore.kernel.org/linux-pci/CAFJ_xbq0cxcH-cgpXLU4Mjk30+muWyWm1aUZGK7iG53yaLBaQg@mail.gmail.com/T/#u
Link: https://lore.kernel.org/r/20230411160213.4453-1-ron.lee@intel.com
Signed-off-by: Ron Lee <ron.lee@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/x86/pci/fixup.c