Skip to content

Commit

Permalink
[SPARC64]: Fix enable_dma() in asm-sparc64/parport.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eddie C. Dost authored and David S. Miller committed Jul 6, 2005
1 parent 9d74953 commit e3e01d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-sparc64/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e3e01d6

Please sign in to comment.