Commit e3e01d60 authored by Eddie C. Dost's avatar Eddie C. Dost Committed by David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d749533
...@@ -27,12 +27,12 @@ static struct sparc_ebus_info { ...@@ -27,12 +27,12 @@ static struct sparc_ebus_info {
static __inline__ void enable_dma(unsigned int dmanr) 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, if (ebus_dma_request(&sparc_ebus_dmas[dmanr].info,
sparc_ebus_dmas[dmanr].addr, sparc_ebus_dmas[dmanr].addr,
sparc_ebus_dmas[dmanr].count)) sparc_ebus_dmas[dmanr].count))
BUG(); BUG();
ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1);
} }
static __inline__ void disable_dma(unsigned int dmanr) static __inline__ void disable_dma(unsigned int dmanr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment