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

Commit ca7a2811 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: bam: Increase polling time to query IPA BAM pipe status



USB BAM driver polls IPA BAM pipe status for emptiness having retry
timeout using usleep_range(1000, 2000) in USB cable disconnect or USB
bus suspend scenarios. In some cases of USB cable disconnect, it has
been observed that USB BAM driver finds IPA BAM pipe non-empty and
crashing device explicitly, and there is possibility IPA peripheral is
about to consume pending provided descriptors. Hence increase polling
time by replacing number of retry count from 10 to 50 which increases
max timeout as 100ms from existing 20ms.

Change-Id: I673c2532d901cc3d3f7ede06da5c0338de10b81f
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 034326e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -958,7 +958,7 @@ static int usb_bam_disconnect_ipa_cons(
	struct usb_bam_ctx_type *ctx = &msm_usb_bam[cur_bam];
	struct usb_bam_pipe_connect *pipe_connect;
	struct sps_pipe *pipe;
	u32 timeout = 10, pipe_empty;
	u32 timeout = 50, pipe_empty;
	struct usb_bam_sps_type usb_bam_sps = ctx->usb_bam_sps;
	struct sps_connect *sps_connection;
	bool inject_zlt = true;