Message ID | 20250313142333.5792-3-ilpo.jarvinen@linux.intel.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | PCI/hotplug: Fix interrupt / event handling problems | expand |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index c487e274b282..634cf5004f76 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -915,11 +915,8 @@ int pciehp_reset_slot(struct hotplug_slot *hotplug_slot, bool probe) if (!pciehp_poll_mode) ctrl_mask |= PCI_EXP_SLTCTL_HPIE; - if (!ATTN_BUTTN(ctrl)) { - ctrl_mask |= PCI_EXP_SLTCTL_PDCE; + if (!ATTN_BUTTN(ctrl)) stat_mask |= PCI_EXP_SLTSTA_PDC; - } - ctrl_mask |= PCI_EXP_SLTCTL_DLLSCE; stat_mask |= PCI_EXP_SLTSTA_DLLSC; pcie_write_cmd(ctrl, 0, ctrl_mask);
The previous change cleared HPIE (Hot-Plug Interrupt Enable) in pciehp_reset_slot(). Clearing HPIE should be enough to synchronize with the interrupt and event handling so that clearing PDCE (Presence Detect Changed Enable) and DLLSCE (Data Link Layer State Changed Enable) is not necessary. However, the commit be54ea5330d ("PCI: pciehp: Disable Data Link Layer State Changed event on suspend") found out that under some circumstances, clearing also DLLSCE is necessary. While this is logically part of the previous change, remove PDCE and DLLSCE clearing in now separately to allow bisect pinpoint it better if removing their clearing causes some issues. Suggested-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> --- drivers/pci/hotplug/pciehp_hpc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)