powerpc/eeh: Tag reset state for user owned PE
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 30 Sep 2014 02:39:06 +0000 (12:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 Sep 2014 07:15:17 +0000 (17:15 +1000)
PE would be owned by userland, which probably request PE reset
done in host side. During the reset, we should drop the PCI
config accesses to the PE with help of flag EEH_PE_RESET.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh.c

index eb266f4ee9be1f4b341cca818eef850d6f271e4f..6936908277859ab774e6e549f19d9ec10c3aaa84 100644 (file)
@@ -1463,6 +1463,7 @@ int eeh_pe_reset(struct eeh_pe *pe, int option)
        switch (option) {
        case EEH_RESET_DEACTIVATE:
                ret = eeh_ops->reset(pe, option);
+               eeh_pe_state_clear(pe, EEH_PE_RESET);
                if (ret)
                        break;
 
@@ -1477,6 +1478,7 @@ int eeh_pe_reset(struct eeh_pe *pe, int option)
                 */
                eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
 
+               eeh_pe_state_mark(pe, EEH_PE_RESET);
                ret = eeh_ops->reset(pe, option);
                break;
        default: