[RESEND][PATCH 2/6] DSPBRIDGE: Fix flood of messages from DSP

2009-11-03 Thread Ramirez Luna, Omar
On behalf of Ernesto.

This patch fixes an issue in dspbridge when several messages are sent
in one shot but MPU was only able to process one message.

Signed-off-by: Ernesto Ramos erne...@ti.com
Signed-off by: Bhavin Shah bs...@ti.com
---
 drivers/dsp/bridge/wmd/msg_sm.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c
index 0231f65..16eab74 100644
--- a/drivers/dsp/bridge/wmd/msg_sm.c
+++ b/drivers/dsp/bridge/wmd/msg_sm.c
@@ -314,6 +314,11 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
   (struct LST_ELEM *)pMsgFrame);
if (LST_IsEmpty(hMsgQueue-msgUsedList))
SYNC_ResetEvent(hMsgQueue-hSyncEvent);
+   else {
+   NTFY_Notify(hMsgQueue-hNtfy,
+   DSP_NODEMESSAGEREADY);
+   SYNC_SetEvent(hMsgQueue-hSyncEvent);
+   }
 
fGotMsg = true;
}
@@ -361,9 +366,11 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
}
hMsgQueue-refCount--;
/* Reset the event if there are still queued messages */
-   if (!LST_IsEmpty(hMsgQueue-msgUsedList))
+   if (!LST_IsEmpty(hMsgQueue-msgUsedList)) {
+   NTFY_Notify(hMsgQueue-hNtfy,
+   DSP_NODEMESSAGEREADY);
SYNC_SetEvent(hMsgQueue-hSyncEvent);
-
+   }
/* Exit critical section */
(void)SYNC_LeaveCS(hMsgMgr-hSyncCS);
}
-- 
1.6.2.4

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


[RESEND][PATCH 2/6] DSPBRIDGE: Fix flood of messages from DSP

2009-11-03 Thread Ramirez Luna, Omar
From: Ernesto Ramos erne...@ti.com

This patch fixes an issue in dspbridge when several messages are sent
in one shot but MPU was only able to process one message.

Signed-off-by: Ernesto Ramos erne...@ti.com
Signed-off by: Bhavin Shah bs...@ti.com
---
 drivers/dsp/bridge/wmd/msg_sm.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c
index 0231f65..16eab74 100644
--- a/drivers/dsp/bridge/wmd/msg_sm.c
+++ b/drivers/dsp/bridge/wmd/msg_sm.c
@@ -314,6 +314,11 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
   (struct LST_ELEM *)pMsgFrame);
if (LST_IsEmpty(hMsgQueue-msgUsedList))
SYNC_ResetEvent(hMsgQueue-hSyncEvent);
+   else {
+   NTFY_Notify(hMsgQueue-hNtfy,
+   DSP_NODEMESSAGEREADY);
+   SYNC_SetEvent(hMsgQueue-hSyncEvent);
+   }
 
fGotMsg = true;
}
@@ -361,9 +366,11 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
}
hMsgQueue-refCount--;
/* Reset the event if there are still queued messages */
-   if (!LST_IsEmpty(hMsgQueue-msgUsedList))
+   if (!LST_IsEmpty(hMsgQueue-msgUsedList)) {
+   NTFY_Notify(hMsgQueue-hNtfy,
+   DSP_NODEMESSAGEREADY);
SYNC_SetEvent(hMsgQueue-hSyncEvent);
-
+   }
/* Exit critical section */
(void)SYNC_LeaveCS(hMsgMgr-hSyncCS);
}
-- 
1.6.2.4

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