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

Skip to content
Commit 3a88d4ba authored by ChandanaKishori Chiluveru's avatar ChandanaKishori Chiluveru Committed by Hemant Kumar
Browse files

usb: gadget: f_mtp: Fix mtp enumeration failure issue



If cable is disconnected while send_file work is in progress,
Endpoints will be disabled and state will be marked as OFFLINE.
As a part of endpoint disable pending requests will be retire out
with -ECONNRESET error. Due to this we will modify the device state
as ERROR in completion callback. If the state is not offline then
we will mark the device state to ready in send_file_work. This results
in mtp driver to not returning any error for next mtp_write operation
and mtp release will not be called.

Hence fix this issue by adding a proper check in completions to not
moving device state to ERROR in case of disconnect.

Change-Id: Idb4e075c89bdf94790a321bc464d30eba546eeaa
Signed-off-by: default avatarChandanaKishori Chiluveru <cchilu@codeaurora.org>
parent 6872338a
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