diff options
author | Russell Currey <ruscur@russell.cc> | 2016-09-12 00:17:24 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-09-22 17:54:21 -0400 |
commit | af2e3a009e7f73c3def283a768ea2cef69ae883e (patch) | |
tree | c2b7e458663da73bde1dabf1346c07f2d7b9fe71 | |
parent | e98ddb77166a4d7ba6235b20a1328ecb137debb2 (diff) |
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 <ruscur@russell.cc>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/eeh_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 29aa8d1ce273..a62be72da274 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c | |||
@@ -993,6 +993,8 @@ static void eeh_handle_special_event(void) | |||
993 | 993 | ||
994 | /* Notify all devices to be down */ | 994 | /* Notify all devices to be down */ |
995 | eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); | 995 | eeh_pe_state_clear(pe, EEH_PE_PRI_BUS); |
996 | eeh_pe_dev_traverse(pe, | ||
997 | eeh_report_failure, NULL); | ||
996 | bus = eeh_pe_bus_get(phb_pe); | 998 | bus = eeh_pe_bus_get(phb_pe); |
997 | if (!bus) { | 999 | if (!bus) { |
998 | pr_err("%s: Cannot find PCI bus for " | 1000 | pr_err("%s: Cannot find PCI bus for " |
@@ -1002,8 +1004,6 @@ static void eeh_handle_special_event(void) | |||
1002 | pe->addr); | 1004 | pe->addr); |
1003 | break; | 1005 | break; |
1004 | } | 1006 | } |
1005 | eeh_pe_dev_traverse(pe, | ||
1006 | eeh_report_failure, NULL); | ||
1007 | pci_hp_remove_devices(bus); | 1007 | pci_hp_remove_devices(bus); |
1008 | } | 1008 | } |
1009 | pci_unlock_rescan_remove(); | 1009 | pci_unlock_rescan_remove(); |