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:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment