linux/drivers/pci/hotplug
Mika Westerberg ee30108f7a PCI: pciehp: Do not disable interrupt twice on suspend
commit 75fcc0ce72 upstream.

We try to keep PCIe hotplug ports runtime suspended when entering system
suspend. Because the PCIe portdrv sets the DPM_FLAG_NEVER_SKIP flag, the PM
core always calls system suspend/resume hooks even if the device is left
runtime suspended. Since PCIe hotplug driver re-used the same function for
both runtime suspend and system suspend, it ended up disabling hotplug
interrupt twice and the second time following was printed:

  pciehp 0000:03:01.0:pcie204: pcie_do_write_cmd: no response from device

Prevent this from happening by checking whether the device is already
runtime suspended when the system suspend hook is called.

Fixes: 9c62f0bfb8 ("PCI: pciehp: Implement runtime PM callbacks")
Link: https://lore.kernel.org/r/20191029170022.57528-1-mika.westerberg@linux.intel.com
Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:48:51 +01:00
..
Kconfig
Makefile
TODO
acpi_pcihp.c
acpiphp.h
acpiphp_core.c
acpiphp_glue.c
acpiphp_ibm.c
cpci_hotplug.h
cpci_hotplug_core.c
cpci_hotplug_pci.c
cpcihp_generic.c
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp.h
cpqphp_core.c
cpqphp_ctrl.c
cpqphp_nvram.c
cpqphp_nvram.h
cpqphp_pci.c
cpqphp_sysfs.c
ibmphp.h
ibmphp_core.c
ibmphp_ebda.c
ibmphp_hpc.c
ibmphp_pci.c
ibmphp_res.c
pci_hotplug_core.c
pciehp.h
pciehp_core.c PCI: pciehp: Do not disable interrupt twice on suspend 2020-01-17 19:48:51 +01:00
pciehp_ctrl.c
pciehp_hpc.c
pciehp_pci.c
pnv_php.c
rpadlpar.h
rpadlpar_core.c
rpadlpar_sysfs.c
rpaphp.h
rpaphp_core.c PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info 2020-01-04 19:18:00 +01:00
rpaphp_pci.c
rpaphp_slot.c
s390_pci_hpc.c
shpchp.h
shpchp_core.c
shpchp_ctrl.c
shpchp_hpc.c
shpchp_pci.c
shpchp_sysfs.c