diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-09-30 06:39:03 +0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-09-30 11:15:15 +0400 |
commit | 9372dddb189a7a7689b674ad2dd31117a407bfd5 (patch) | |
tree | ae428c9ea26c34632978b1378117a8420d0110f1 /arch/powerpc/kernel/eeh.c | |
parent | c9dd0143978e1c473c08dafe8156259b895db3e2 (diff) | |
download | linux-9372dddb189a7a7689b674ad2dd31117a407bfd5.tar.xz |
powerpc/eeh: Block PCI config access during reset
Function pcibios_set_pcie_reset_state() can be used to do PCI
reset. PCI config access during the reset usually causes EEH
errors unexpectedly. In order to avoid the EEH error, the patch
blocks PCI config access during reset with the help of flag
EEH_PE_RESET, which is similar to what we did in EEH PE reset
path.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/eeh.c')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index c79583fe1905..eb266f4ee9be 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -668,14 +668,18 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat switch (state) { case pcie_deassert_reset: eeh_ops->reset(pe, EEH_RESET_DEACTIVATE); + eeh_pe_state_clear(pe, EEH_PE_RESET); break; case pcie_hot_reset: + eeh_pe_state_mark(pe, EEH_PE_RESET); eeh_ops->reset(pe, EEH_RESET_HOT); break; case pcie_warm_reset: + eeh_pe_state_mark(pe, EEH_PE_RESET); eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL); break; default: + eeh_pe_state_clear(pe, EEH_PE_RESET); return -EINVAL; }; |