linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: pciehp: Fix system hang on resume after hot-unplug during suspend
@ 2024-09-26 12:59 Chia-Lin Kao (AceLan)
  2024-09-26 13:23 ` Lukas Wunner
  0 siblings, 1 reply; 14+ messages in thread
From: Chia-Lin Kao (AceLan) @ 2024-09-26 12:59 UTC (permalink / raw)
  To: Bjorn Helgaas, Ilpo Järvinen, Lukas Wunner, linux-pci,
	linux-kernel

Remove unnecessary pci_walk_bus() call in pciehp_resume_noirq(). This
fixes a system hang that occurs when resuming after a Thunderbolt dock
with attached thunderbolt storage is unplugged during system suspend.

The PCI core already handles setting the disconnected state for devices
under a port during suspend/resume. The redundant bus walk was
interfering with proper hardware state detection during resume, causing
a system hang when hot-unplugging daisy-chained Thunderbolt devices.

Fixes: 9d573d19547b ("PCI: pciehp: Detect device replacement during system sleep")
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
---
 drivers/pci/hotplug/pciehp_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index ff458e692fed..c1c3f7e2bc43 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -330,8 +330,6 @@ static int pciehp_resume_noirq(struct pcie_device *dev)
 		 */
 		if (pciehp_device_replaced(ctrl)) {
 			ctrl_dbg(ctrl, "device replaced during system sleep\n");
-			pci_walk_bus(ctrl->pcie->port->subordinate,
-				     pci_dev_set_disconnected, NULL);
 			pciehp_request(ctrl, PCI_EXP_SLTSTA_PDC);
 		}
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-10-23  4:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 12:59 [PATCH] PCI: pciehp: Fix system hang on resume after hot-unplug during suspend Chia-Lin Kao (AceLan)
2024-09-26 13:23 ` Lukas Wunner
2024-09-27  7:33   ` AceLan Kao
2024-09-27  9:28     ` Lukas Wunner
2024-09-28 12:51       ` Lukas Wunner
2024-09-30  1:31         ` AceLan Kao
2024-10-01 11:02           ` Lukas Wunner
2024-10-01 11:03             ` Lukas Wunner
2024-10-07  4:34               ` AceLan Kao
2024-10-17  2:40                 ` AceLan Kao
2024-10-22 13:05                   ` AceLan Kao
2024-10-23  4:23                   ` Ethan Zhao
2024-09-30  3:27       ` AceLan Kao
2024-10-01 11:07         ` Lukas Wunner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).