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

Skip to content
Commit 62b11b12 authored by Danny Segal's avatar Danny Segal
Browse files

usb: gadget: Fix race condition between function wakeup and bus resume



When a SS-USB function wishes to wake up the USB bus, it needs to send a
SS-USB function wakeup notification to the USB host after the bus is
resumed. For this purpose a function wake up pending flag is used to notify
the resume callback that a function wake up notification needs to be sent.
However, sometimes there is a race condition in which the resume interrupt
is fired before the function wakeup function is complete, and this leads to
an incorrect state of the function wakeup pending flag. This patch
resolves this issue by adding locks in the critical sections.

CRs-fixed: 695399
Change-Id: I8f15ac0c433301d6364a49cb31577e30259aa0b9
Signed-off-by: default avatarDanny Segal <dsegal@codeaurora.org>
parent 545af185
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