]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: exynos-acpm: check saved RX before bailing out on empty RX queue
authorTudor Ambarus <tudor.ambarus@linaro.org>
Mon, 24 Mar 2025 12:35:41 +0000 (12:35 +0000)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 7 Apr 2025 06:02:19 +0000 (08:02 +0200)
commit2908ffa53f8ed487ab4285635c79d4911cced93c
tree4310bf3f6f0b357fc2c8af0d74a59a426974219e
parent0af2f6be1b4281385b618cb86ad946eded089ac8
firmware: exynos-acpm: check saved RX before bailing out on empty RX queue

When we're polling for responses and get a response that corresponds to
another request, we save the RX data in order to drain the RX queue.

If the response for the current request is not found in the request's
iteration of the queue, or if the queue is empty, we must check whether
the RX data was saved by a previous request when it drained the RX queue.

We failed to check for already saved responses when the queue was empty,
and requests could time out. Check saved RX before bailing out on empty
RX queue.

Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver")
Reported-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Tested-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250324-acpm-drained-rx-queue-v1-1-577774335151@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/firmware/samsung/exynos-acpm.c