usb: gadget: qc_ecm: Release EPs if disable happens before set_alt(1)
DATA EPs (bulk IN/OUT) are used only after set_alt(1). If disconnect
(disable) happens before this then EPs are configured again based
on the stopped. Things work fine if there is no change in speed on
next connection. Otherwise for a scenario like below device ends up
using wrong maxPacketSize with endpoint.
-ECM gadget connects in FullSpeed
-SET_CONFIG happens: This results in set_alt(0)
-Disconnection and reconnect in HighSpeed
-SET_CONFIG
-set_alt(1) for ECM.
This results in ECM using 64bytes maxpacket size in high speed and
may result in data stall.
Fix this by explicitly clearing ep->driver_data on disconnect.
CRs-Fixed: 722950
Change-Id: Ieb6b333195387e42df35f76b40ac1e171d46b1da
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment