Commit 910e9e60 authored by Mayank Rana's avatar Mayank Rana Committed by Treehugger Robot
Browse files

UPSTREAM: usb: dwc3: Fix ep0 handling when getting reset while doing control transfer



According to the databook ep0 should be in setup phase during reset.
If host issues reset between control transfers, ep0 will be  in an
invalid state. Fix this by issuing stall and restart on ep0 if it
is not in setup phase.

Also SW needs to complete pending control transfer and setup core for
next setup stage as per data book. Hence check ep0 state during reset
interrupt handling and make sure active transfers on ep0 out/in
endpoint are stopped by queuing ENDXFER command for that endpoint and
restart ep0 out again to receive next setup packet.

Signed-off-by: default avatarMayank Rana <quic_mrana@quicinc.com>
Link: https://lore.kernel.org/r/1651693001-29891-1-git-send-email-quic_mrana@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 9d778f0c)

Bug: 258997352
Change-Id: Ie7482ba08d4f77ad65f404b3014ac880f5a5a75e
Signed-off-by: default avatarKrishna Kurapati <quic_kriskura@quicinc.com>
parent e0243d19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment