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

Skip to content
Commit 8dd2e3cc authored by Manu Gautam's avatar Manu Gautam Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarManu Gautam <mgautam@codeaurora.org>
parent 3511ae2a
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