Skip to content

Commit 527664f

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: pciehp: Don't enable HPIE when resuming in poll mode
PCIe hotplug can operate in poll mode without interrupt handlers using a polling kthread only. eb34da6 ("PCI: pciehp: Disable hotplug interrupt during suspend") failed to consider that and enables HPIE (Hot-Plug Interrupt Enable) unconditionally when resuming the Port. Only set HPIE if non-poll mode is in use. This makes pcie_enable_interrupt() match how pcie_enable_notification() already handles HPIE. Link: https://lore.kernel.org/r/[email protected] Fixes: eb34da6 ("PCI: pciehp: Disable hotplug interrupt during suspend") Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Lukas Wunner <[email protected]>
1 parent e326023 commit 527664f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/pci/hotplug/pciehp_hpc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,9 @@ void pcie_enable_interrupt(struct controller *ctrl)
842842
{
843843
u16 mask;
844844

845-
mask = PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_DLLSCE;
845+
mask = PCI_EXP_SLTCTL_DLLSCE;
846+
if (!pciehp_poll_mode)
847+
mask |= PCI_EXP_SLTCTL_HPIE;
846848
pcie_write_cmd(ctrl, mask, mask);
847849
}
848850

0 commit comments

Comments
 (0)