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

Skip to content
Commit b00da106 authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru
Browse files

usb: dwc3: ep0: Fail enqueue() when racing with pullup_disable()



dwc3_gadget_pullup() function already has a logic to ensure that no
transfers are in progress before clearing the run/stop bit. Currently
there is a check which ensures ep0 is in EP0_SETUP_PHASE and if not
simply waits for any pending control transfer to conclude and return
to that initial state. Their is a possible race where host sends
a setup packet between this check and just before clearing run/stop
bit in pullup disable. It can result in controller halt failure
followed by smmu fault due to accessing stale TRBs.

Fix this issue by checking softconnect flag in ep0 file to avoid
control packet queue during pullup disable path.

Change-Id: Ieb303858f2b9528d12e0f7262ffd23a96f4e91ff
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 71de7168
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