aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/eeh_pe.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-11-26 09:41:09 +0100
committerThierry Reding <treding@nvidia.com>2014-11-26 09:42:11 +0100
commit7f06dd61248a75668bbb39b6fcca6ff407745df8 (patch)
tree30cefbd6f503d20557e24a1765a027687170a7da /arch/powerpc/kernel/eeh_pe.c
parentLinux 3.18-rc1 (diff)
parentpowerpc/iommu: Rename iommu_[un]map_sg functions (diff)
downloadlinux-dev-7f06dd61248a75668bbb39b6fcca6ff407745df8.tar.xz
linux-dev-7f06dd61248a75668bbb39b6fcca6ff407745df8.zip
Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
This branch contains a couple of changes that will conflict with the Tegra SMMU driver rewrite. Since the driver is largely rewritten the conflict resolution is non-trivial.
Diffstat (limited to 'arch/powerpc/kernel/eeh_pe.c')
-rw-r--r--arch/powerpc/kernel/eeh_pe.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c
index 53dd0915e690..5a63e2b0f65b 100644
--- a/arch/powerpc/kernel/eeh_pe.c
+++ b/arch/powerpc/kernel/eeh_pe.c
@@ -525,7 +525,7 @@ static void *__eeh_pe_state_mark(void *data, void *flag)
pe->state |= state;
/* Offline PCI devices if applicable */
- if (state != EEH_PE_ISOLATED)
+ if (!(state & EEH_PE_ISOLATED))
return NULL;
eeh_pe_for_each_dev(pe, edev, tmp) {
@@ -534,6 +534,10 @@ static void *__eeh_pe_state_mark(void *data, void *flag)
pdev->error_state = pci_channel_io_frozen;
}
+ /* Block PCI config access if required */
+ if (pe->state & EEH_PE_CFG_RESTRICTED)
+ pe->state |= EEH_PE_CFG_BLOCKED;
+
return NULL;
}
@@ -611,6 +615,10 @@ static void *__eeh_pe_state_clear(void *data, void *flag)
pdev->error_state = pci_channel_io_normal;
}
+ /* Unblock PCI config access if required */
+ if (pe->state & EEH_PE_CFG_RESTRICTED)
+ pe->state &= ~EEH_PE_CFG_BLOCKED;
+
return NULL;
}