From patchwork Fri Oct 30 23:08:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ramos Falcon, Ernesto" X-Patchwork-Id: 56733 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9UN8PUR025203 for ; Fri, 30 Oct 2009 23:08:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933070AbZJ3XIT (ORCPT ); Fri, 30 Oct 2009 19:08:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933068AbZJ3XIS (ORCPT ); Fri, 30 Oct 2009 19:08:18 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:57877 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933060AbZJ3XIS convert rfc822-to-8bit (ORCPT ); Fri, 30 Oct 2009 19:08:18 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9UN8NU6026164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 30 Oct 2009 18:08:23 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n9UN8Md4027931 for ; Fri, 30 Oct 2009 18:08:23 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id n9UN8Mc8019152 for ; Fri, 30 Oct 2009 18:08:22 -0500 (CDT) Received: from dlee01.ent.ti.com ([157.170.170.12]) by dlee73.ent.ti.com ([157.170.170.88]) with mapi; Fri, 30 Oct 2009 18:08:22 -0500 From: "Ramos Falcon, Ernesto" To: "linux-omap@vger.kernel.org" Date: Fri, 30 Oct 2009 18:08:22 -0500 Subject: [PATCH] DSPBRIDGE: Fix flood of messages from DSP Thread-Topic: [PATCH] DSPBRIDGE: Fix flood of messages from DSP Thread-Index: AcpZteBmfzg7yEDOSAmQ6o/W862gVA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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); }