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:Ajay Agarwal <ajaya@codeaurora.org>
Loading
Please register or sign in to comment