diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-04-09 11:43:57 +1000 |
---|---|---|
committer | Eli Qiao <taget@linux.vnet.ibm.com> | 2014-04-14 10:12:29 +0800 |
commit | 71c2fd97ed01be288beb20800597f374288a45e1 (patch) | |
tree | c12713cd53c06d90095c1cc3b3c36716b5145ef5 | |
parent | 8bc6b3417651c82e781205b2c2bb5efdd5fd2818 (diff) | |
download | powerkvm-71c2fd97ed01be288beb20800597f374288a45e1.tar.gz |
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>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-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 8c4733592cff92..e3f31a36c7df7e 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) */ msleep(EEH_PE_RESET_HOLD_TIME); - /* 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 @@ -645,8 +639,10 @@ int eeh_reset_pe(struct eeh_pe *pe) eeh_reset_pe_once(pe); rc = eeh_ops->wait_state(pe, EEH_PE_STATUS_WAIT_TIME); - 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", |