Commit 6a1eddd2 authored by Joerg Roedel's avatar Joerg Roedel

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent b26e81b8
...@@ -318,8 +318,11 @@ static void __iommu_wait_for_completion(struct amd_iommu *iommu) ...@@ -318,8 +318,11 @@ static void __iommu_wait_for_completion(struct amd_iommu *iommu)
status &= ~MMIO_STATUS_COM_WAIT_INT_MASK; status &= ~MMIO_STATUS_COM_WAIT_INT_MASK;
writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET); writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET);
if (unlikely(i == EXIT_LOOP_COUNT)) if (unlikely(i == EXIT_LOOP_COUNT)) {
panic("AMD IOMMU: Completion wait loop failed\n"); spin_unlock(&iommu->lock);
reset_iommu_command_buffer(iommu);
spin_lock(&iommu->lock);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment