aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@sonymobile.com>2015-08-24 16:38:46 -0400
committerAndy Gross <agross@codeaurora.org>2015-09-09 16:58:04 -0400
commit208487a8f69084992f76ef87ddd3e00e5eaf6587 (patch)
tree14081925eaa635304acb76e7a917399fcbce7205
parent93dbed9121cc8e0fcc93edd9fca901322bdfbd1a (diff)
soc: qcom: smd: Correct fBLOCKREADINTR handling
fBLOCKREADINTR is masking the notification from the remote and should hence be cleared while we're waiting the tx fifo to drain. Also change the reset state to mask the notification, as send is the only use case where we're interested in it. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Andy Gross <agross@codeaurora.org>
-rw-r--r--drivers/soc/qcom/smd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/soc/qcom/smd.c b/drivers/soc/qcom/smd.c
index edd9d9a37238..a6155c917d52 100644
--- a/drivers/soc/qcom/smd.c
+++ b/drivers/soc/qcom/smd.c
@@ -312,7 +312,7 @@ static void qcom_smd_channel_reset(struct qcom_smd_channel *channel)
312 SET_TX_CHANNEL_INFO(channel, fHEAD, 0); 312 SET_TX_CHANNEL_INFO(channel, fHEAD, 0);
313 SET_TX_CHANNEL_INFO(channel, fTAIL, 0); 313 SET_TX_CHANNEL_INFO(channel, fTAIL, 0);
314 SET_TX_CHANNEL_INFO(channel, fSTATE, 1); 314 SET_TX_CHANNEL_INFO(channel, fSTATE, 1);
315 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0); 315 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1);
316 SET_TX_CHANNEL_INFO(channel, head, 0); 316 SET_TX_CHANNEL_INFO(channel, head, 0);
317 SET_TX_CHANNEL_INFO(channel, tail, 0); 317 SET_TX_CHANNEL_INFO(channel, tail, 0);
318 318
@@ -683,7 +683,7 @@ int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len)
683 goto out; 683 goto out;
684 } 684 }
685 685
686 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1); 686 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0);
687 687
688 ret = wait_event_interruptible(channel->fblockread_event, 688 ret = wait_event_interruptible(channel->fblockread_event,
689 qcom_smd_get_tx_avail(channel) >= tlen || 689 qcom_smd_get_tx_avail(channel) >= tlen ||
@@ -691,7 +691,7 @@ int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len)
691 if (ret) 691 if (ret)
692 goto out; 692 goto out;
693 693
694 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0); 694 SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1);
695 } 695 }
696 696
697 SET_TX_CHANNEL_INFO(channel, fTAIL, 0); 697 SET_TX_CHANNEL_INFO(channel, fTAIL, 0);