mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
neuron: block_client: Fix init loop
Depending on timing there is a chance the channel initialization will happen at different intervals. When this happens, the first channel wakeup will be cleared by the init loop and never be set again by the channel init. This leads to a stall in init because both channels will never have both their wakeups set to signal channel init done. Change-Id: I435e78c3e4b83cf6b827d3827f35d1e6a1b297fa Acked-by: Chris Henroid <chenroid@qti.qualcomm.com> Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
9a643a2168
commit
a0a416b179
1 changed files with 1 additions and 5 deletions
|
|
@ -178,8 +178,8 @@ static int protocol_block_client_thread(void *data)
|
|||
skb_req = NULL;
|
||||
|
||||
/* Wait for the channels to start */
|
||||
wakeup_mask = 0;
|
||||
while (!kthread_should_stop()) {
|
||||
wakeup_mask = 0;
|
||||
if (!channel_dev->max_size || !channel_dev->queue_length)
|
||||
wakeup_mask |= CHANNEL_BIT(C_IN);
|
||||
|
||||
|
|
@ -192,10 +192,6 @@ static int protocol_block_client_thread(void *data)
|
|||
wait_event_killable(kdata->wait_q,
|
||||
kthread_should_stop() ||
|
||||
(kdata->wakeups & wakeup_mask));
|
||||
|
||||
wakeup_mask &= ~xchg(&kdata->wakeups, 0);
|
||||
/* flush shared variable to memory */
|
||||
smp_mb__after_atomic();
|
||||
}
|
||||
if (kthread_should_stop())
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue