Loading
usb: u_bam_data: Invalidate prod and cons client handles upon connect
Producer and consumer USB BAM pipe client handles are zero initialized
which is a valid value for a client handle. It is possible that only
consumer pipe is connected in connect work and disconnect interrupt
comes and sets the state as U_BAM_DATA_DISCONNECT_E. When connect work
gets a chance to run due to disconnect it disconnects both producer and
consumer pipes by checking if handle is valid. This results in calling
disconnect on a client handle which is not connected yet. Hence
invalidate both pipe's client handle first before calling pipe connect.
Also, let disconnect work perform disconnect of producer and consumer
pipes instead of calling usb_bam_disconnect_ipa() from connect work.
CRs-Fixed: 788805
Change-Id: I3c36d2bb926265f96793d7968aa75963319b4991
Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>