usb: bam: Fix USB IPA BAM disconnect sequence
Currently below mentioned USB IPA bam disconnect sequence is used:
1. USB bam driver disconnects IPA producer pipe.
2. USB bam driver releases IPA RM resource for USB_PROD and wait for
IPA producer to be released.
3. Here USB consumer is also being released.
4. USB bam driver before disconnects USB producer bam pipe, It is
waiting for USB producer bam pipe to be empty, and not finding empty,
it is trying to inject ZLT.
USB_PROD with IPA RM resource can't be released if USB driver wants
to make sure that data from USB bam produer pipe is drained out and
also wants to inject ZLT to signal the same. This results into
unclock access while injecting ZLT. Hence fix this issue by correcting
USB IPA bam disconnect sequence as below:
1. USB bam driver disconnects IPA Producer pipe.
2. USB bam driver before disconnects USB producer bam pipe, It is
waiting for USB producer BAM pipe to be empty, and not finding it,
it is trying to inject ZLT.
3. USB BAM driver releases IPA RM resource for USB_PROD and wait for
IPA producer to be release if above step 2 is completed.
4. Here USB consumer is also being released.
Change-Id: Iba04c9884ffc4a76ac98854eebd10f8955ce7141
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment