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:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment