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

Skip to content
Commit 80fa8183 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: f_ipc: Mark current state to CONNECTED before registering pdev



Currently as a part of set_alt, the driver first registers
'ipc_bridge' platform device and then marks the current_state to
IPC_CONNECTED. But as soon as the pdev is registered, the
ipc_router transport driver queues read request which will fail
because the current_state is still IPC_DISCONNECTED. Hence IPC
core misses the reply to the hello packet leading to
functionality failure.
Fix this by first marking current_state to IPC_CONNECTED and
then going to register platform device with ipc_bridge. While at
it, also use interruptible variant of wait_for_completion method
to unblock thread is request completion is stuck.

Change-Id: Ib2b5cd86f93af4947ec95047f803f8e08c156537
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 91184d29
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