]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/vf: Fix queuing of recovery work
authorSatyanarayana K V P <satyanarayana.k.v.p@intel.com>
Wed, 10 Dec 2025 05:25:48 +0000 (05:25 +0000)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 15 Dec 2025 13:16:48 +0000 (14:16 +0100)
Ensure VF migration recovery work is only queued when no recovery is
already queued and teardown is not in progress.

Fixes: b47c0c07c350 ("drm/xe/vf: Teardown VF post migration worker on driver unload")
Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20251210052546.622809-5-satyanarayana.k.v.p@intel.com
(cherry picked from commit 8d8cf42b03f149dcb545b547906306f3b474565e)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_gt_sriov_vf.c

index 4c73a077d314fa0ed6ee373070b2ee5a555b2b4a..033eae2d03d3387ff6e0aad2132573b829927bee 100644 (file)
@@ -733,7 +733,7 @@ static void vf_start_migration_recovery(struct xe_gt *gt)
 
        spin_lock(&gt->sriov.vf.migration.lock);
 
-       if (!gt->sriov.vf.migration.recovery_queued ||
+       if (!gt->sriov.vf.migration.recovery_queued &&
            !gt->sriov.vf.migration.recovery_teardown) {
                gt->sriov.vf.migration.recovery_queued = true;
                WRITE_ONCE(gt->sriov.vf.migration.recovery_inprogress, true);