]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pciehp: Obey compulsory command delay after resume
authorLukas Wunner <lukas@wunner.de>
Thu, 19 Jul 2018 22:27:54 +0000 (17:27 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 31 Jul 2018 16:07:59 +0000 (11:07 -0500)
commit627f4d372c2d4f41d6d4d00cb4d53f235c661a76
tree1e07c0b18b5c7ede6ba7208777e660dc1a18f542
parent7c88eb5cb5cfaf88a8a97439ca3c84f435b45de9
PCI: pciehp: Obey compulsory command delay after resume

Upon resume from system sleep, the Slot Control register is written via:

  pci_pm_resume_noirq()
    pci_pm_default_resume_early()
      pci_restore_state()
        pci_restore_pcie_state()

PCIe r4.0, sec 6.7.3.2 says that after "issuing a write transaction that
targets any portion of the Port's Slot Control register, [...] software
must wait for [the] command to complete before issuing the next command".

pciehp currently fails to enforce that rule after the above-mentioned
write.  Fix it.

(Moving restoration of the Slot Control register to pciehp doesn't seem
to make sense because the other PCIe hotplug drivers may need it as
well.)

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp_core.c