hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/powerpc/kernel/eeh_driver.c
....@@ -1054,45 +1054,46 @@
10541054 }
10551055
10561056 pr_info("EEH: Recovery successful.\n");
1057
- } else {
1058
- /*
1059
- * About 90% of all real-life EEH failures in the field
1060
- * are due to poorly seated PCI cards. Only 10% or so are
1061
- * due to actual, failed cards.
1062
- */
1063
- pr_err("EEH: Unable to recover from failure from PHB#%x-PE#%x.\n"
1064
- "Please try reseating or replacing it\n",
1065
- pe->phb->global_number, pe->addr);
1057
+ goto out;
1058
+ }
10661059
1067
- eeh_slot_error_detail(pe, EEH_LOG_PERM);
1060
+ /*
1061
+ * About 90% of all real-life EEH failures in the field
1062
+ * are due to poorly seated PCI cards. Only 10% or so are
1063
+ * due to actual, failed cards.
1064
+ */
1065
+ pr_err("EEH: Unable to recover from failure from PHB#%x-PE#%x.\n"
1066
+ "Please try reseating or replacing it\n",
1067
+ pe->phb->global_number, pe->addr);
10681068
1069
- /* Notify all devices that they're about to go down. */
1070
- eeh_set_channel_state(pe, pci_channel_io_perm_failure);
1071
- eeh_set_irq_state(pe, false);
1072
- eeh_pe_report("error_detected(permanent failure)", pe,
1073
- eeh_report_failure, NULL);
1069
+ eeh_slot_error_detail(pe, EEH_LOG_PERM);
10741070
1075
- /* Mark the PE to be removed permanently */
1076
- eeh_pe_state_mark(pe, EEH_PE_REMOVED);
1071
+ /* Notify all devices that they're about to go down. */
1072
+ eeh_set_irq_state(pe, false);
1073
+ eeh_pe_report("error_detected(permanent failure)", pe,
1074
+ eeh_report_failure, NULL);
1075
+ eeh_set_channel_state(pe, pci_channel_io_perm_failure);
10771076
1078
- /*
1079
- * Shut down the device drivers for good. We mark
1080
- * all removed devices correctly to avoid access
1081
- * the their PCI config any more.
1082
- */
1083
- if (pe->type & EEH_PE_VF) {
1084
- eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
1085
- eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
1086
- } else {
1087
- eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
1088
- eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
1077
+ /* Mark the PE to be removed permanently */
1078
+ eeh_pe_state_mark(pe, EEH_PE_REMOVED);
10891079
1090
- pci_lock_rescan_remove();
1091
- pci_hp_remove_devices(bus);
1092
- pci_unlock_rescan_remove();
1093
- /* The passed PE should no longer be used */
1094
- return;
1095
- }
1080
+ /*
1081
+ * Shut down the device drivers for good. We mark
1082
+ * all removed devices correctly to avoid access
1083
+ * the their PCI config any more.
1084
+ */
1085
+ if (pe->type & EEH_PE_VF) {
1086
+ eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
1087
+ eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
1088
+ } else {
1089
+ eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
1090
+ eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
1091
+
1092
+ pci_lock_rescan_remove();
1093
+ pci_hp_remove_devices(bus);
1094
+ pci_unlock_rescan_remove();
1095
+ /* The passed PE should no longer be used */
1096
+ return;
10961097 }
10971098
10981099 out:
....@@ -1188,10 +1189,10 @@
11881189
11891190 /* Notify all devices to be down */
11901191 eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
1191
- eeh_set_channel_state(pe, pci_channel_io_perm_failure);
11921192 eeh_pe_report(
11931193 "error_detected(permanent failure)", pe,
11941194 eeh_report_failure, NULL);
1195
+ eeh_set_channel_state(pe, pci_channel_io_perm_failure);
11951196
11961197 pci_lock_rescan_remove();
11971198 list_for_each_entry(hose, &hose_list, list_node) {