usb: dwc3: gadget: Block GSI DB update after END transfer on all EPs

As a part of composition switch or cable disconnect/connect, the
driver is blocking DB writes from USB GSI wrapper first and then
issuing ENDTRANSFER command on the endpoints. This can lead to
pending doorbell updates being done after the GSI channels are
setup again. In the scenario when comp switch is done from a
composition having 2 GSI functions to a composition having 1 GSI
function, this can lead to unused interrupter number channel
accessing unmapped doorbell address.
Fix this by blocking GSI DB updates only after issuing
ENDTRANSFER command on all the endpoints so that pending DB
updates are done. Also, block GSI DB update only once which will
cover for all the endpoints.

Change-Id: I2434a3c392307acdc964179a109458458ba0d488
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed