diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-04-24 12:00:11 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-04-28 11:33:57 +0400 |
commit | 7b401850a1c9b64b010b3d107321df4e7d066995 (patch) | |
tree | 7f8a050bfb871ba780420d0c44bc771c9bf4fa52 /arch | |
parent | b34497d1844ac89269eb2c6faea0ceec7757a9c3 (diff) | |
download | linux-7b401850a1c9b64b010b3d107321df4e7d066995.tar.xz |
powerpc/eeh: EEH_PE_ISOLATED not reflect HW state
When doing PE reset, EEH_PE_ISOLATED is cleared unconditionally.
However, We should remove that if the PE reset has cleared the
frozen state successfully. Otherwise, the flag should be kept.
The patch fixes the issue.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index f1676762f6de..cc728e8c6ee6 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -612,12 +612,6 @@ static void eeh_reset_pe_once(struct eeh_pe *pe) #define PCI_BUS_RST_HOLD_TIME_MSEC 250 msleep(PCI_BUS_RST_HOLD_TIME_MSEC); - /* We might get hit with another EEH freeze as soon as the - * pci slot reset line is dropped. Make sure we don't miss - * these, and clear the flag now. - */ - eeh_pe_state_clear(pe, EEH_PE_ISOLATED); - eeh_ops->reset(pe, EEH_RESET_DEACTIVATE); /* After a PCI slot has been reset, the PCI Express spec requires @@ -646,8 +640,10 @@ int eeh_reset_pe(struct eeh_pe *pe) eeh_reset_pe_once(pe); rc = eeh_ops->wait_state(pe, PCI_BUS_RESET_WAIT_MSEC); - if ((rc & flags) == flags) + if ((rc & flags) == flags) { + eeh_pe_state_clear(pe, EEH_PE_ISOLATED); return 0; + } if (rc < 0) { pr_err("%s: Unrecoverable slot failure on PHB#%d-PE#%x", |