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

Commit c1bc6511 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: bam: Only call msm_hw_disable_bam for CI controller"

parents 254ab5c9 c19cf4fd
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2170,12 +2170,12 @@ int usb_bam_connect_ipa(struct usb_bam_connect_ipa_params *ipa_params)
	     (ctx.pipes_enabled_per_bam[cur_bam] == 0)) {
		spin_unlock(&usb_bam_lock);

		if (cur_bam != HSIC_CTRL)
		if (cur_bam == CI_CTRL)
			msm_hw_bam_disable(1);

		sps_device_reset(ctx.h_bam[cur_bam]);

		if (cur_bam != HSIC_CTRL)
		if (cur_bam == CI_CTRL)
			msm_hw_bam_disable(0);

		/* On re-connect assume out from lpm for HOST BAM */
@@ -2757,8 +2757,14 @@ int usb_bam_a2_reset(bool to_reconnect)
	pr_debug("%s: pipes disconnection success\n", __func__);
	/* Reset A2 (USB/HSIC) BAM */
	if (to_reset_bam) {
		if (bam == CI_CTRL)
			msm_hw_bam_disable(1);

		if (sps_device_reset(ctx.h_bam[bam]))
			pr_err("%s: BAM reset failed\n", __func__);

		if (bam == CI_CTRL)
			msm_hw_bam_disable(0);
	}

	if (!to_reconnect)
+0 −5
Original line number Diff line number Diff line
@@ -1506,8 +1506,6 @@ static int gbam_peer_reset_cb(void *param)
	gadget = dev->cdev->gadget;

	pr_debug("%s: reset by peer\n", __func__);
	/* Disable BAM */
	msm_hw_bam_disable(1);

	/* Reset BAM */
	ret = usb_bam_a2_reset(0);
@@ -1516,9 +1514,6 @@ static int gbam_peer_reset_cb(void *param)
		return ret;
	}

	/* Enable BAM */
	msm_hw_bam_disable(0);

	/* Unregister the peer reset callback */
	if (d->trans == USB_GADGET_XPORT_BAM2BAM && port->port_num == 0)
		usb_bam_register_peer_reset_cb(NULL, NULL);
+0 −6
Original line number Diff line number Diff line
@@ -629,9 +629,6 @@ static int bam_data_peer_reset_cb(void *param)

	pr_debug("%s: reset by peer\n", __func__);

	/* Disable BAM */
	msm_hw_bam_disable(1);

	/* Reset BAM */
	ret = usb_bam_a2_reset(0);
	if (ret) {
@@ -639,9 +636,6 @@ static int bam_data_peer_reset_cb(void *param)
		return ret;
	}

	/* Enable BAM */
	msm_hw_bam_disable(0);

	/* Unregister the peer reset callback */
	usb_bam_register_peer_reset_cb(NULL, NULL);