dwc3: Don't perform set xfer resource from EP_OP_CONFIG for GSI endpoint
By default when ep0 gets enable, current code SET XFER resource command
for all USB endpoints excluding USB GSI endpoint. SET XFER resource
command shall fail if all resources are allocated. All allocated transfer
resources are resets in controller when DEPXFERCFG cmd is send with ep0
with value as 2 OR when controller is being peformed power on reset or
being restarted (i.e. device initiated disconnect and reconnect).
Consider case as below:
a. USB enumerated
b. USB bus suspend
c. USB bus reset
d. USB connect done
e. USB set_config() (set_alt())
f. Reenable all USB endpoint and resize tx fifo for it except ep0 and ep1
g. USB GSI endpoint operation (EP_OP_CONFIG) is sending SET XFER RESOURCE
which is failing as all resources are already allocated.
ep0 is disabled while clearing run stop and re-enabled when setting run
stop. For USB device mode we know that ep0 enabling is prerequisite before
setting run stop. Hence let ep0 enabling takes care of reallocating
transfer resources for all endpoint including USB GSI endpoints.
Change-Id: Ic5ab7558fadc636aaf255d62f91abf7842460659
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment