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

Skip to content
Commit ad8d260c authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: dwc3: gadget: Check controller status with endpoint enable/disable



Some USB function driver (e.g. mass storage) performs USB endpoint enable
and disable functionality from worker thread context instead of composite/
controller work context. This may result into endpoint enable/disable
racing against USB controller low power mode functionality with USB cable
disconnect. This race may result into unclock register access. Hence fix
this issue by checking USB controller status and perform resume/autosuspend
with endpoint disable whereas return -EINVAL with endpoint enable if USB
controller is suspended (in low power mode).

Change-Id: I76cd75fc90b52ceefe099f48be6c880c04136301
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 8ac77746
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