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

Commit 45b16e7b authored by Mayank Rana's avatar Mayank Rana Committed by Jack Pham
Browse files

usb: dwc3-msm: Use dedicated workqueue for resume_work



Currently resume_work() is scheduled on the system_wq workqueue,
however that may allow resume_work to get scheduled on multiple
CPUs simultaneously. This can be seen when multiple VBUS or ID
pin events are generated in rapid succession which can lead to
the input event bits getting set to an inconsistent state.
Alleviate this by creating a dedicated workqueue with the
WQ_ORDERED flag set, which will restrict resume_work() to only
run once at a time. Since it also flushes sm_work, that will
ensure that resume_work and sm_work are properly serialized.

Change-Id: I47e5167ee989b60e860391870e693ee631999809
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 319472d7
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