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

Skip to content
Commit 8cdf59a0 authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: gadget: u_bam: Add synchronization between IRQ and workqueue



USB cable connect/disconnect and suspend/resume processing
happens in IRQ context. Driver also uses workqueue to process some
part of connect and disconnect handling. Add spin_lock to achieve
synchronization between these contexts. And check for port_usb
(cable connect status) early in connect_wq before initializing
tethering or data path setup. Otherwise there is a chance of
connect_wq bailing out in middle of processing (e.g. on fast
connect/suspend/resume/disconnect) affecting or rather breaking
the functionality on next connect.

CRs-Fixed: 614257
Change-Id: I141cfdd619672db5ab8549ea9fdeab46058e1b74
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 71ee1119
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