Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

at_hdmac: bugfix for enabling channel irq

commit 463894705e4089d0ff69e7d877312d496ac70e5b deleted redundant
chan_id and chancnt initialization in dma drivers as this is done
in dma_async_device_register().

However, atc_enable_irq() relied on chan_id set before registering
the device, what left only channel 0 functional for this driver.

This patch introduces atc_enable/disable_chan_irq() as a variant
of atc_enable/disable_irq() with the channel as explicit argument.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>

authored by

Nikolaus Voss and committed by
Vinod Koul
bda3a47c dcd6c922

+10 -11
+2 -2
drivers/dma/at_hdmac.c
··· 1343 1343 1344 1344 tasklet_init(&atchan->tasklet, atc_tasklet, 1345 1345 (unsigned long)atchan); 1346 - atc_enable_irq(atchan); 1346 + atc_enable_chan_irq(atdma, i); 1347 1347 } 1348 1348 1349 1349 /* set base routines */ ··· 1410 1410 struct at_dma_chan *atchan = to_at_dma_chan(chan); 1411 1411 1412 1412 /* Disable interrupts */ 1413 - atc_disable_irq(atchan); 1413 + atc_disable_chan_irq(atdma, chan->chan_id); 1414 1414 tasklet_disable(&atchan->tasklet); 1415 1415 1416 1416 tasklet_kill(&atchan->tasklet);
+8 -9
drivers/dma/at_hdmac_regs.h
··· 327 327 } 328 328 329 329 330 - static void atc_setup_irq(struct at_dma_chan *atchan, int on) 330 + static void atc_setup_irq(struct at_dma *atdma, int chan_id, int on) 331 331 { 332 - struct at_dma *atdma = to_at_dma(atchan->chan_common.device); 333 - u32 ebci; 332 + u32 ebci; 334 333 335 334 /* enable interrupts on buffer transfer completion & error */ 336 - ebci = AT_DMA_BTC(atchan->chan_common.chan_id) 337 - | AT_DMA_ERR(atchan->chan_common.chan_id); 335 + ebci = AT_DMA_BTC(chan_id) 336 + | AT_DMA_ERR(chan_id); 338 337 if (on) 339 338 dma_writel(atdma, EBCIER, ebci); 340 339 else 341 340 dma_writel(atdma, EBCIDR, ebci); 342 341 } 343 342 344 - static inline void atc_enable_irq(struct at_dma_chan *atchan) 343 + static void atc_enable_chan_irq(struct at_dma *atdma, int chan_id) 345 344 { 346 - atc_setup_irq(atchan, 1); 345 + atc_setup_irq(atdma, chan_id, 1); 347 346 } 348 347 349 - static inline void atc_disable_irq(struct at_dma_chan *atchan) 348 + static void atc_disable_chan_irq(struct at_dma *atdma, int chan_id) 350 349 { 351 - atc_setup_irq(atchan, 0); 350 + atc_setup_irq(atdma, chan_id, 0); 352 351 } 353 352 354 353