From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Guenter Roeck <groeck@juniper.net>,
Lukas Wunner <lukas@wunner.de>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Rajat Jain <rajatxjain@gmail.com>,
Joel Mathew Thomas <proxy0@tutamail.com>,
linux-kernel@vger.kernel.org
Cc: "Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 2/4] PCI/hotplug: Clearing HPIE for the duration of reset is enough
Date: Thu, 13 Mar 2025 16:23:31 +0200 [thread overview]
Message-ID: <20250313142333.5792-3-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20250313142333.5792-1-ilpo.jarvinen@linux.intel.com>
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(-)
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
next prev parent reply other threads:[~2025-03-13 14:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 14:23 [PATCH 0/4] PCI/hotplug: Fix interrupt / event handling problems Ilpo Järvinen
2025-03-13 14:23 ` [PATCH 1/4] PCI/hotplug: Disable HPIE over reset Ilpo Järvinen
2025-03-15 15:58 ` Lukas Wunner
[not found] ` <OLQ9qyD--F-9@tutamail.com>
2025-03-15 21:12 ` Lukas Wunner
2025-03-17 18:08 ` Ilpo Järvinen
2025-03-13 14:23 ` Ilpo Järvinen [this message]
2025-03-13 14:23 ` [PATCH 3/4] PCI/hotplug: reset_lock is not required synchronizing with irq thread Ilpo Järvinen
2025-03-14 8:32 ` Lukas Wunner
2025-03-14 11:18 ` Ilpo Järvinen
2025-03-13 14:23 ` [PATCH 4/4] PCI/hotplug: Don't enabled HPIE in poll mode Ilpo Järvinen
2025-03-15 11:57 ` Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250313142333.5792-3-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=groeck@juniper.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=proxy0@tutamail.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rajatxjain@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox