msm: bam_dmux: abort ul wakeups in the middle of SSR

Abort any uplonk wakeups that happen to occur in the middle of subsystem
restart.  This may occur as a small race condition window exists where
bam_dmux knows SSR has occured, but hadn't yet sent that info to the
clients.  During this small window, a client may try to send some data,
triggering a ul_wakeup()

CRs-Fixed: 392604
Change-Id: Id45c184efd44fe467b19ab36a2e34557d661f55a
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
diff --git a/arch/arm/mach-msm/bam_dmux.c b/arch/arm/mach-msm/bam_dmux.c
index fbc3e25..1a02fce 100644
--- a/arch/arm/mach-msm/bam_dmux.c
+++ b/arch/arm/mach-msm/bam_dmux.c
@@ -1711,6 +1711,20 @@
 	}
 
 	/*
+	 * if this gets hit, that means restart_notifier_cb() has started
+	 * but probably not finished, thus we know SSR has happened, but
+	 * haven't been able to send that info to our clients yet.
+	 * in that case, abort the ul_wakeup() so that we don't undo any
+	 * work restart_notifier_cb() has done.  The clients will be notified
+	 * shortly.  No cleanup necessary (reschedule the wakeup) as our and
+	 * their SSR handling will cover it
+	 */
+	if (unlikely(in_global_reset == 1)) {
+		mutex_unlock(&wakeup_lock);
+		return;
+	}
+
+	/*
 	 * if someone is voting for UL before bam is inited (modem up first
 	 * time), set flag for init to kickoff ul wakeup once bam is inited
 	 */