diff options
| author | Arun Kumar Neelakantam <aneela@codeaurora.org> | 2018-02-08 16:26:16 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-18 00:26:26 -0700 |
| commit | 57efc49c752eaa294b457c8b0d4f647ac29448db (patch) | |
| tree | d763a566cbadd40f70b983e74a5ef77acb020b98 | |
| parent | 42e90fc52db9cade49b85a8f4d442b624c0c61bc (diff) | |
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: Arun Kumar Neelakantam <aneela@codeaurora.org>
| -rw-r--r-- | drivers/soc/qcom/glink_smem_native_xprt.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/soc/qcom/glink_smem_native_xprt.c b/drivers/soc/qcom/glink_smem_native_xprt.c index 6cf4c7b6dd8a..c78c8a00aa21 100644 --- a/drivers/soc/qcom/glink_smem_native_xprt.c +++ b/drivers/soc/qcom/glink_smem_native_xprt.c @@ -831,24 +831,31 @@ static bool get_rx_fifo(struct edge_info *einfo) */ 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)) { - einfo->tx_resume_needed = false; - einfo->xprt_if.glink_core_if_ptr->tx_resume( - &einfo->xprt_if); - } + 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; + trigger_resume = true; + } + } 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); } /** |
