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

Commit 68156b47 authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam
Browse files

soc: qcom: glink: Fix not sending READ_NOTIF command issue



The "tx_blocked_signal_sent" flag is not reset correctly after receiving
the interrupt from the remote side. Hence further READ_NOTIF commands are
not written into FIFO in FIFO full case.

Reset the "tx_blocked_signal_sent" correctly after write space available
in FIFO.

CRs-Fixed: 2175526
Change-Id: I236da2a2b984b3f3cce8400b50f72ce1016d7e40
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent 398933dc
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -860,22 +860,29 @@ static void tx_wakeup_worker(struct edge_info *einfo)
{
	struct glink_transport_if xprt_if = einfo->xprt_if;
	bool trigger_wakeup = false;
	bool trigger_resume = false;
	unsigned long flags;

	if (einfo->in_ssr)
		return;
	if (einfo->tx_resume_needed && fifo_write_avail(einfo)) {

	spin_lock_irqsave(&einfo->write_lock, flags);
	if (fifo_write_avail(einfo)) {
		if (einfo->tx_blocked_signal_sent)
			einfo->tx_blocked_signal_sent = false;
		if (einfo->tx_resume_needed) {
			einfo->tx_resume_needed = false;
		xprt_if.glink_core_if_ptr->tx_resume(&xprt_if);
			trigger_resume = true;
		}
	}
	spin_lock_irqsave(&einfo->write_lock, flags);
	if (waitqueue_active(&einfo->tx_blocked_queue)) { /* tx waiting ?*/
		einfo->tx_blocked_signal_sent = false;
		trigger_wakeup = true;
	}
	spin_unlock_irqrestore(&einfo->write_lock, flags);
	if (trigger_wakeup)
		wake_up_all(&einfo->tx_blocked_queue);
	if (trigger_resume)
		xprt_if.glink_core_if_ptr->tx_resume(&xprt_if);
}

/**