From: Eddie C. Dost Date: Wed, 6 Jul 2005 22:41:54 +0000 (-0700) Subject: [SPARC64]: Fix enable_dma() in asm-sparc64/parport.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3e01d6005ab4b0877f1fb3efef7f5b745e743be;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 --- diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index b7e635544ce..56b5197d789 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h @@ -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)