@@ -267,15 +267,20 @@ static void dpc_process_error(struct dpc_dev *dpc)
/* show RP PIO error detail information */
if (dpc->rp_extensions && reason == 3 && ext_reason == 0)
dpc_process_rp_pio_error(dpc);
- else if (reason == 0 &&
+ else if (reason <= 2 &&
dpc_get_aer_uncorrect_severity(pdev, &info) &&
aer_get_device_error_info(pdev, &info)) {
aer_print_error(pdev, &info);
pci_cleanup_aer_uncorrect_error_status(pdev);
- pci_aer_clear_fatal_status(pdev);
+ if (reason != 1)
+ pci_aer_clear_fatal_status(pdev);
}
- /* We configure DPC so it only triggers on ERR_FATAL */
+ /*
+ * Irrespective of whether the DPC event is triggered by
+ * ERR_FATAL or ERR_NONFATAL, since the link is already down,
+ * use the FATAL error recovery path for both cases.
+ */
pcie_do_recovery(pdev, pci_channel_io_frozen, PCIE_PORT_SERVICE_DPC);
}