From: Shivananda Hebbar <[email protected]>

This patch removes conditional check for uMaxMsgs for the below reasons.
1)1st conditional check.
MPU Bridge stops processing messages from DSP, if uMaxMsgs (currently 8) are 
sent in one shot. The check (>=) will make it to return from function without 
processing any messages. So DSP will be waiting forever to get the ack from MPU 
saying that MPU has read the messages. If this happens, the communication from 
DSP to MPU is broken forever.
2)2nd conditional check
- This patch also removes unnecessary check because DSP never sends messages 
more than uMaxMsgs.

Discovered-by: Bhavin Shah <[email protected]>
Signed-off-by: Shivananda Hebbar <[email protected]>
---
 drivers/dsp/bridge/wmd/io_sm.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c 
index 39b37a6..b2092a2 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -1328,7 +1328,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
        fInputEmpty = IO_GetValue(pIOMgr->hWmdContext, struct MSG, pCtrl,
                                 bufEmpty);
        uMsgs = IO_GetValue(pIOMgr->hWmdContext, struct MSG, pCtrl, size);
-       if (fInputEmpty || uMsgs >= hMsgMgr->uMaxMsgs)
+       if (fInputEmpty)
                goto func_end;
 
        pMsgInput = pIOMgr->pMsgInput;
@@ -1356,9 +1356,6 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
                 * input locations have been set up. If all nodes were
                 * cleaned up, hMsgMgr->uMaxMsgs should be 0.
                 */
-               if (hMsgQueue && uMsgs > hMsgMgr->uMaxMsgs)
-                       goto func_end;
-
                while (hMsgQueue != NULL) {
                        if (msg.dwId == hMsgQueue->dwId) {
                                /* Found it */
--
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to