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

Commit a8455fed authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: bam_dmux: Abort open/close cmd during SSR



BAM DMUX clients are calling close when modem is in SSR state which
can cause BAM HW registers access when clocks are off.

Bail out open and close operation in SSR case.

CRs-Fixed: 2288122
Change-Id: Id8cb08aab34b135f17241df76e3726488448999f
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent f3a27013
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1122,6 +1122,12 @@ int msm_bam_dmux_open(uint32_t id, void *priv,
		kfree(hdr);
		return -ENODEV;
	}
	if (in_global_reset) {
		BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
		spin_unlock_irqrestore(&bam_ch[id].lock, flags);
		kfree(hdr);
		return -ENODEV;
	}

	bam_ch[id].notify = notify;
	bam_ch[id].priv = priv;
@@ -1200,6 +1206,12 @@ int msm_bam_dmux_close(uint32_t id)
		return 0;
	}

	if (in_global_reset) {
		BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
		read_unlock(&ul_wakeup_lock);
		return 0;
	}

	hdr = kmalloc(sizeof(struct bam_mux_hdr), GFP_ATOMIC);
	if (hdr == NULL) {
		read_unlock(&ul_wakeup_lock);