aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-09-03 09:15:10 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2009-09-03 09:56:19 -0400
commit6a1eddd2f951656a6abbd42e2cddc2267c4a639d (patch)
treed9290794ae58aef32738b332e8613b5f2b761ffb
parentb26e81b871bd18184968f0bb3f12945906eadfce (diff)
x86/amd-iommu: Reset command buffer if wait loop fails
Instead of a panic on an comletion wait loop failure, try to recover from that event from resetting the command buffer. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r--arch/x86/kernel/amd_iommu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index b62a2f64dfc5..cfca80bfe75f 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -318,8 +318,11 @@ static void __iommu_wait_for_completion(struct amd_iommu *iommu)
318 status &= ~MMIO_STATUS_COM_WAIT_INT_MASK; 318 status &= ~MMIO_STATUS_COM_WAIT_INT_MASK;
319 writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET); 319 writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET);
320 320
321 if (unlikely(i == EXIT_LOOP_COUNT)) 321 if (unlikely(i == EXIT_LOOP_COUNT)) {
322 panic("AMD IOMMU: Completion wait loop failed\n"); 322 spin_unlock(&iommu->lock);
323 reset_iommu_command_buffer(iommu);
324 spin_lock(&iommu->lock);
325 }
323} 326}
324 327
325/* 328/*