Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dccd6ce authored by Steven Cahail's avatar Steven Cahail Committed by Karthikeyan Ramasubramanian
Browse files

soc: qcom: glink: Properly manage auxiliary pointer in tx() error handling



In tx_work_func(), an auxiliary pointer to the head of the channel list
is currently kept in order to detect when all channels in the list have
been transmitted. If the original list head is reached after trying all
the channels, the transmit is aborted to avoid an infinite loop. However,
this auxiliary pointer always starts as the first channel in the highest
priority bin. If there are no channels in the highest priority bin, the
pointer is set to NULL, which causes the check to see if the original
list head has been reached to always return false. Therefore, repeated
transmit failures do not trigger an exit from the loop.

Instead of setting the auxiliary pointer before the loop and when a channel
has sent all of its packets, initialize the auxiliary pointer to NULL and
set it during the loop if it is NULL or if a higher priority channel is
being processed. Finally, set it to NULL at the end of each iteration of
the loop. This avoids the infinite loop case described above.

Change-Id: I8ae7cd4403dfcb880c46e3c7b4bc6ecba6a0ba77
Signed-off-by: default avatarSteven Cahail <scahail@codeaurora.org>
parent ee630a97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment