Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pf: Fix EAGAIN sign in pf_migration_consume()
@ 2026-04-28 18:30 Shuicheng Lin
  2026-04-28 18:51 ` Gustavo Sousa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shuicheng Lin @ 2026-04-28 18:30 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin, Michał Winiarski

PTR_ERR() returns a negative value, so comparing against the positive
EAGAIN is always true for ERR_PTR(-EAGAIN), causing pf_migration_consume()
to bail out instead of continuing to the remaining GTs. On multi-GT
platforms this can skip GTs that already have data ready.

Compare against -EAGAIN to match the intent (and the following line
that correctly uses -EAGAIN).

Fixes: 67df4a5cbc58 ("drm/xe/pf: Add data structures and handlers for migration rings")
Assisted-by: Claude:claude-opus-4.6
Cc: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_sriov_pf_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_migration.c b/drivers/gpu/drm/xe/xe_sriov_pf_migration.c
index 6c4b16409cc9..d6f602f715f0 100644
--- a/drivers/gpu/drm/xe/xe_sriov_pf_migration.c
+++ b/drivers/gpu/drm/xe/xe_sriov_pf_migration.c
@@ -149,7 +149,7 @@ pf_migration_consume(struct xe_device *xe, unsigned int vfid)
 
 	for_each_gt(gt, xe, gt_id) {
 		data = xe_gt_sriov_pf_migration_save_consume(gt, vfid);
-		if (data && PTR_ERR(data) != EAGAIN)
+		if (data && PTR_ERR(data) != -EAGAIN)
 			return data;
 		if (PTR_ERR(data) == -EAGAIN)
 			more_data = true;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-28 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 18:30 [PATCH] drm/xe/pf: Fix EAGAIN sign in pf_migration_consume() Shuicheng Lin
2026-04-28 18:51 ` Gustavo Sousa
2026-04-28 19:08 ` ✓ CI.KUnit: success for " Patchwork
2026-04-28 19:56 ` ✓ Xe.CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox