]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC64]: Fix enable_dma() in asm-sparc64/parport.h
authorEddie C. Dost <ecd@brainaid.de>
Wed, 6 Jul 2005 22:41:54 +0000 (15:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2005 22:41:54 +0000 (15:41 -0700)
Call ebus_dma_enable() before calling ebus_dma_request(), otherwise
ebus_dma_request() returns -EINVAL and enable_dma() calls BUG()...

Signed-off-by: David S. Miller <davem@davemloft.net>
include/asm-sparc64/parport.h

index b7e635544cecce868e1e5fdc7cf328528b934c3d..56b5197d789827e680d72027bb03c407daaefe0f 100644 (file)
@@ -27,12 +27,12 @@ static struct sparc_ebus_info {
 
 static __inline__ void enable_dma(unsigned int dmanr)
 {
+       ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
+
        if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info,
                             sparc_ebus_dmas[dmanr].addr,
                             sparc_ebus_dmas[dmanr].count))
                BUG();
-
-       ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
 }
 
 static __inline__ void disable_dma(unsigned int dmanr)