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

Skip to content
Commit 4604b6ec authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: gadget: f_ipc: Wait for req completion only when suspended



'Commit ab5cf70b ("usb: gadget: f_ipc: Add support of
sideband notifier call chain")' added support for case where the
IPC message is queued onto the bus by the device and the host
suspends the bus after that. The device is expected to wait for
the host to resume and complete this pending transfer. For that,
the driver currently re-initializes the write_done completion and
waits for the transfer to complete if the online flag is false.
But this flag is false also as a part of composition switch or
cable disconnect when _disable will be called. Consider the case
of device reboot where qrtr is waiting for ipc_write to return so
that it can release its lock and honor other services. Because
of the mentioned commit, ipc_write never returns and these
services are not able to end gracefully.
Fix this by waiting for completion only if the _suspend has been
called.

Change-Id: I77dc2c0d4a5eb9642d11081636e1ba3817402c01
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 260264b0
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