linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ppopov@linux-mips.org
Date: Tue, 08 Feb 2005 06:28:44 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ppopov@ftp.linux-mips.org       05/02/08 06:28:37

Modified files:
        arch/mips/au1000/common: Tag: linux_2_4 dbdma.c 

Log message:
        Fixed a raced condition where by the DDMA doorbell is rung while the
        last part of the descriptor might still be in the write buffer.

diff -urN linux/arch/mips/au1000/common/dbdma.c 
linux/arch/mips/au1000/common/dbdma.c
--- linux/arch/mips/au1000/common/dbdma.c       2005/01/30 08:01:27     1.1.2.5
+++ linux/arch/mips/au1000/common/dbdma.c       2005/02/08 06:28:37     1.1.2.6
@@ -596,10 +596,9 @@
         * */
        dma_cache_wback_inv(buf,nbytes);
         dp->dscr_cmd0 |= DSCR_CMD0_V;        /* Let it rip */
+       au_sync();
        dma_cache_wback_inv(dp, sizeof(dp));
-
         ctp->chan_ptr->ddma_dbell = 0;
-               au_sync();
 
        /* return something not zero.
        */
@@ -658,10 +657,9 @@
         * */
        dma_cache_inv(buf,nbytes);
        dp->dscr_cmd0 |= DSCR_CMD0_V;   /* Let it rip */
+       au_sync();
        dma_cache_wback_inv(dp, sizeof(dp));
-
         ctp->chan_ptr->ddma_dbell = 0;
-       au_sync();
        
        /* Get next descriptor pointer.
        */

<Prev in Thread] Current Thread [Next in Thread>