OSDN Git Service

usb: dwc3-msm: Queue resume_work unconditionally on pm_resume
authorAjay Agarwal <ajaya@codeaurora.org>
Tue, 31 Jul 2018 07:10:10 +0000 (12:40 +0530)
committerAjay Agarwal <ajaya@codeaurora.org>
Tue, 31 Jul 2018 07:17:12 +0000 (12:47 +0530)
commit3674a33d5de3d453795941e2d3db9248298d6cfb
treee35385f0ec46cd6b3b11979e6df693f7140265c4
parent1deb9383f1a5c164dbc1dec03bbd48d6101f5d3c
usb: dwc3-msm: Queue resume_work unconditionally on pm_resume

Currently on pm_resume, the driver queues resume_work only if
vbus_active is true or id_state is false. So when the system is
suspended with host mode cable connected and the cable is
disconnected, the port still remains in host mode. Fix this by
unconditionally queueing resume_work from pm_resume and adding
required pm_relax in B_IDLE branch of sm_work.
Also create a freezable workqueue for sm_work so that the work
items do not race with pm_resume of child devices.

Change-Id: I9b79ddcc44c87111fc85086038361d9140be2af5
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
drivers/usb/dwc3/dwc3-msm.c