usb: gadget: gsi: Optimize TRB's buffer allocation functionality
TRB's buffer related memory is allocated as part of gsi_bind() for each
USB GSI interface if it is part of USB compsition (i.e. USB multi config
composition). This memory is never de-allocated (i.e. USB cable
disconnect case) until USB composition switch. Also only one USB tethered
GSI interface is used out of mult-config based on selection of USB config
by USB host. Hence allocate TRB's buffer related memory after set_alt(1)
from ipa_work_handler() and de-allocate same from set_alt(0) OR USB
composition switch OR USB bus suspend with remote wakeup disable case.
Change-Id: I1bdfe16273186b594f83fd03936a461895701996
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment