All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch]PCI:AER:Notify which device has no error_detected callback
@ 2019-12-13 11:44 Yicong Yang
  2019-12-13 22:57 ` Bjorn Helgaas
  0 siblings, 1 reply; 6+ messages in thread
From: Yicong Yang @ 2019-12-13 11:44 UTC (permalink / raw)
  To: linux-pci, bhelgaas

The PCI error recovery will fail if any device under
root port doesn't have an error_detected callback.
Currently only failure result is printed, which is
not enough to determine which device leads to the
failure and the detailed failure reason.

Add print information if certain device under root
port has no error_detected callback.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
 drivers/pci/pcie/err.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index b0e6048..ec37c33 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -61,8 +61,10 @@ static int report_error_detected(struct pci_dev *dev,
 		 * error callbacks of "any" device in the subtree, and will
 		 * exit in the disconnected error state.
 		 */
-		if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
+		if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
 			vote = PCI_ERS_RESULT_NO_AER_DRIVER;
+			pci_info(dev, "AER: Device has no error_detected callback\n");
+		}
 		else
 			vote = PCI_ERS_RESULT_NONE;
 	} else {
--
2.8.1


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

end of thread, other threads:[~2019-12-17 11:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-13 11:44 [Patch]PCI:AER:Notify which device has no error_detected callback Yicong Yang
2019-12-13 22:57 ` Bjorn Helgaas
2019-12-16 10:30   ` Yicong Yang
2019-12-16 17:58     ` Bjorn Helgaas
2019-12-16 18:28       ` Alex Williamson
2019-12-17 11:12         ` Yicong Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.