Skip to content

Commit af2e3a0

Browse files
ruscurmpe
authored andcommitted
powerpc/eeh: Skip finding bus until after failure reporting
In eeh_handle_special_event(), eeh_pe_bus_get() is called before calling eeh_report_failure() on every device under a PE. If a PE was missing a bus for some reason, the error would occur before reporting failure, even though eeh_report_failure() doesn't require a bus. Fix this by moving the bus retrieval and error check after the eeh_report_failure() calls. Signed-off-by: Russell Currey <[email protected]> Reviewed-by: Andrew Donnellan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent e98ddb7 commit af2e3a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kernel/eeh_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ static void eeh_handle_special_event(void)
993993

994994
/* Notify all devices to be down */
995995
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
996+
eeh_pe_dev_traverse(pe,
997+
eeh_report_failure, NULL);
996998
bus = eeh_pe_bus_get(phb_pe);
997999
if (!bus) {
9981000
pr_err("%s: Cannot find PCI bus for "
@@ -1002,8 +1004,6 @@ static void eeh_handle_special_event(void)
10021004
pe->addr);
10031005
break;
10041006
}
1005-
eeh_pe_dev_traverse(pe,
1006-
eeh_report_failure, NULL);
10071007
pci_hp_remove_devices(bus);
10081008
}
10091009
pci_unlock_rescan_remove();

0 commit comments

Comments
 (0)