summaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2017-10-10 16:59:32 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-07 22:39:30 -0800
commit37d3ef23d682f66d7f3d77ce49928a2882325777 (patch)
treec9b69ed8f36984508056e941f5a46b09f23c31a7 /lib/mpi/mpiutil.c
parente5f8604fdbb137f26a6cdb89b33b4214ead43dfc (diff)
usb: pd: Avoid blocking wait in SRC_TRANSITION_TO_DEFAULT
When sending/receiving a hard reset in source mode, the PE_SRC_TRANSITION_TO_DEFAULT state turns off VBUS/VCONN and sleeps for 750ms. During this fairly long period any Type-C event such as cable disconnect or reconnect won't get processed as the workqueue is blocked by this wait condition. This can lead to incorrect state handling, for example when a sink is removed and a source is attached; the state machine will think a sink is still attached. Fix this by removing the msleep() and set a timer to restart the state machine to PE_UNKNOWN which will turn VBUS/VCONN back on and start again in PE_SRC_STARTUP. This frees up the workqueue to process any potential incoming events in the meantime. Change-Id: I282551a58252a672f319d1559eac9f4ad4c3ca8a Signed-off-by: Jack Pham <jackp@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions