summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie/edr.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2023-04-07 12:19:46 -0500
committerBjorn Helgaas <bhelgaas@google.com>2023-04-07 17:39:53 -0500
commit774820b362b07b903354470f9372d528b327a3e5 (patch)
tree348d4d691903dc8f1bad690677b5641ffa8e40bc /drivers/pci/pcie/edr.c
parentc441b1e03da6c680a3e12da59c554f454f2ccf5e (diff)
downloadlinux-stable-774820b362b07b903354470f9372d528b327a3e5.tar.gz
linux-stable-774820b362b07b903354470f9372d528b327a3e5.tar.bz2
linux-stable-774820b362b07b903354470f9372d528b327a3e5.zip
PCI/EDR: Add edr_handle_event() comments
EDR documentation is a bit sketchy. Add a couple comments to edr_handle_event() about the devices involved. Link: https://lore.kernel.org/r/20230407215259.GA3825733@bhelgaas Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Diffstat (limited to 'drivers/pci/pcie/edr.c')
-rw-r--r--drivers/pci/pcie/edr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
index 87734e4c3c20..5f4914d313a1 100644
--- a/drivers/pci/pcie/edr.c
+++ b/drivers/pci/pcie/edr.c
@@ -151,9 +151,18 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
if (event != ACPI_NOTIFY_DISCONNECT_RECOVER)
return;
+ /*
+ * pdev is a Root Port or Downstream Port that is still present and
+ * has triggered a containment event, e.g., DPC, so its child
+ * devices have been disconnected (ACPI r6.5, sec 5.6.6).
+ */
pci_info(pdev, "EDR event received\n");
- /* Locate the port which issued EDR event */
+ /*
+ * Locate the port that experienced the containment event. pdev
+ * may be that port or a parent of it (PCI Firmware r3.3, sec
+ * 4.6.13).
+ */
edev = acpi_dpc_port_get(pdev);
if (!edev) {
pci_err(pdev, "Firmware failed to locate DPC port\n");