.. | .. |
---|
1054 | 1054 | } |
---|
1055 | 1055 | |
---|
1056 | 1056 | 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 | + } |
---|
1066 | 1059 | |
---|
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); |
---|
1068 | 1068 | |
---|
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); |
---|
1074 | 1070 | |
---|
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); |
---|
1077 | 1076 | |
---|
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); |
---|
1089 | 1079 | |
---|
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; |
---|
1096 | 1097 | } |
---|
1097 | 1098 | |
---|
1098 | 1099 | out: |
---|
.. | .. |
---|
1188 | 1189 | |
---|
1189 | 1190 | /* Notify all devices to be down */ |
---|
1190 | 1191 | eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true); |
---|
1191 | | - eeh_set_channel_state(pe, pci_channel_io_perm_failure); |
---|
1192 | 1192 | eeh_pe_report( |
---|
1193 | 1193 | "error_detected(permanent failure)", pe, |
---|
1194 | 1194 | eeh_report_failure, NULL); |
---|
| 1195 | + eeh_set_channel_state(pe, pci_channel_io_perm_failure); |
---|
1195 | 1196 | |
---|
1196 | 1197 | pci_lock_rescan_remove(); |
---|
1197 | 1198 | list_for_each_entry(hose, &hose_list, list_node) { |
---|