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:
Steven Cahail <scahail@codeaurora.org>
Loading
Please register or sign in to comment