lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250313142333.5792-3-ilpo.jarvinen@linux.intel.com>
Date: Thu, 13 Mar 2025 16:23:31 +0200
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
	linux-pci@...r.kernel.org,
	Guenter Roeck <groeck@...iper.net>,
	Lukas Wunner <lukas@...ner.de>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Rajat Jain <rajatxjain@...il.com>,
	Joel Mathew Thomas <proxy0@...amail.com>,
	linux-kernel@...r.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 2/4] PCI/hotplug: Clearing HPIE for the duration of reset is enough

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@...ner.de>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
 drivers/pci/hotplug/pciehp_hpc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

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);
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ