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

Commit 7cd11d1c authored by Bar Weiner's avatar Bar Weiner
Browse files

usb: bam: Fix IPA resource manager status flags



Without this fix, cons_stopped and prod_stopped flags
are only cleared for the first pipe of each usb bam
connection. For multiple connect/disconnect and
suspend/resume sequences this can cause an issue
where the flags are not valid which result in
start_cons_transfer() returns without executing,
which cause a data stall.
This fix solve this problem by updating these flags
for each pipe.

Change-Id: Idd4eeffd0a04de8c70b7f3b59fc3287cc9abea42
Signed-off-by: default avatarBar Weiner <bweiner@codeaurora.org>
parent 2b979b24
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2021,12 +2021,12 @@ int usb_bam_connect_ipa(struct usb_bam_connect_ipa_params *ipa_params)
			info[cur_bam].pipes_suspended = 0;
			info[cur_bam].pipes_to_suspend = 0;
			info[cur_bam].pipes_resumed = 0;
			pipe_connect->cons_stopped = 0;
			pipe_connect->prod_stopped = 0;
			spin_unlock(&usb_bam_ipa_handshake_info_lock);
			usb_bam_resume_core(cur_bam, USB_BAM_DEVICE);
		} else
			spin_unlock(&usb_bam_lock);
		pipe_connect->cons_stopped = 0;
		pipe_connect->prod_stopped = 0;
	}

	 /* Check if BAM requires RESET before connect and reset first pipe */