summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNikhil P. Rao <nikhil.rao@amd.com>2026-05-15 21:29:05 +0000
committerJakub Kicinski <kuba@kernel.org>2026-05-19 19:12:42 -0700
commit0e46b6635b03d29807f810c3b415c4755a3f958d (patch)
treec9b2242bb1170c235b30f4d8a889b5f749a5f00b /include
parent0cb5a74faa3bdcfa3b18735d554e12c0f615e35d (diff)
pds_core: fix error handling in pdsc_devcmd_wait
Fix two cases where pdsc_devcmd_wait() returns stale success from the completion register instead of an error: 1. FW crash: If firmware stops running, the wait loop breaks early with running=false. The condition "if ((!done || timeout) && running)" is false, so error handling is bypassed and stale status is returned. Check !running first and return -ENXIO. 2. Timeout: If a command times out, err is set to -ETIMEDOUT but then overwritten by pdsc_err_to_errno(status) which reads stale status. Return -ETIMEDOUT immediately after cleaning up. Both errors now propagate to pdsc_devcmd_locked() which queues health_work for recovery. Fixes: 45d76f492938 ("pds_core: set up device and adminq") Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com> Link: https://patch.msgid.link/20260515212907.998028-1-nikhil.rao@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions