[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201002184735.1229220-8-seanvk.dev@oregontracks.org>
Date: Fri, 2 Oct 2020 11:47:28 -0700
From: Sean V Kelley <seanvk.dev@...gontracks.org>
To: bhelgaas@...gle.com, Jonathan.Cameron@...wei.com,
rafael.j.wysocki@...el.com, ashok.raj@...el.com,
tony.luck@...el.com, sathyanarayanan.kuppuswamy@...el.com,
qiuxu.zhuo@...el.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Sean V Kelley <sean.v.kelley@...el.com>
Subject: [PATCH v8 07/14] PCI/ERR: Limit AER resets in pcie_do_recovery()
From: Sean V Kelley <sean.v.kelley@...el.com>
In some cases a bridge may not exist as the hardware
controlling may be handled only by firmware and so is
not visible to the OS. This scenario is also possible
in future use cases involving non-native use of RCECs
by firmware. So explicitly apply conditional logic
around these resets by limiting them to root ports and
downstream ports.
Signed-off-by: Sean V Kelley <sean.v.kelley@...el.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
---
drivers/pci/pcie/err.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index 9b2130725ab6..5ff1afa4763d 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -218,9 +218,12 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
pci_dbg(dev, "broadcast resume message\n");
pci_walk_bridge(bridge, report_resume, &status);
- if (pcie_aer_is_native(bridge))
- pcie_clear_device_status(bridge);
- pci_aer_clear_nonfatal_status(bridge);
+ if (type == PCI_EXP_TYPE_ROOT_PORT ||
+ type == PCI_EXP_TYPE_DOWNSTREAM) {
+ if (pcie_aer_is_native(bridge))
+ pcie_clear_device_status(bridge);
+ pci_aer_clear_nonfatal_status(bridge);
+ }
pci_info(dev, "device recovery successful\n");
return status;
--
2.28.0
Powered by blists - more mailing lists