Commit e3e01d6005ab4b0877f1fb3efef7f5b745e743be

Authored by Eddie C. Dost
Committed by David S. Miller
1 parent 9d7495330b

[SPARC64]: Fix enable_dma() in asm-sparc64/parport.h

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

include/asm-sparc64/parport.h
... ... @@ -27,12 +27,12 @@
27 27  
28 28 static __inline__ void enable_dma(unsigned int dmanr)
29 29 {
  30 + ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
  31 +
30 32 if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info,
31 33 sparc_ebus_dmas[dmanr].addr,
32 34 sparc_ebus_dmas[dmanr].count))
33 35 BUG();
34   -
35   - ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
36 36 }
37 37  
38 38 static __inline__ void disable_dma(unsigned int dmanr)