Commit e8d7515a authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: cancel reset work on fini

Cancel any pending reset work when we tear down the driver.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8861a820
...@@ -239,6 +239,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev) ...@@ -239,6 +239,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
if (r) { if (r) {
adev->irq.installed = false; adev->irq.installed = false;
flush_work(&adev->hotplug_work); flush_work(&adev->hotplug_work);
cancel_work_sync(&adev->reset_work);
return r; return r;
} }
...@@ -264,6 +265,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev) ...@@ -264,6 +265,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
if (adev->irq.msi_enabled) if (adev->irq.msi_enabled)
pci_disable_msi(adev->pdev); pci_disable_msi(adev->pdev);
flush_work(&adev->hotplug_work); flush_work(&adev->hotplug_work);
cancel_work_sync(&adev->reset_work);
} }
for (i = 0; i < AMDGPU_MAX_IRQ_SRC_ID; ++i) { for (i = 0; i < AMDGPU_MAX_IRQ_SRC_ID; ++i) {
......
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