Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.

Commit ceac55e

Browse files
Nikolaus VossLuis Henriques
authored andcommitted
at_hdmac: bugfix for enabling channel irq
BugLink: http://bugs.launchpad.net/bugs/931719 commit bda3a47 upstream. commit 4638947 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 <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Tim Gardner <[email protected]>
1 parent d58a787 commit ceac55e

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

drivers/dma/at_hdmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
12791279

12801280
tasklet_init(&atchan->tasklet, atc_tasklet,
12811281
(unsigned long)atchan);
1282-
atc_enable_irq(atchan);
1282+
atc_enable_chan_irq(atdma, i);
12831283
}
12841284

12851285
/* set base routines */
@@ -1348,7 +1348,7 @@ static int __exit at_dma_remove(struct platform_device *pdev)
13481348
struct at_dma_chan *atchan = to_at_dma_chan(chan);
13491349

13501350
/* Disable interrupts */
1351-
atc_disable_irq(atchan);
1351+
atc_disable_chan_irq(atdma, chan->chan_id);
13521352
tasklet_disable(&atchan->tasklet);
13531353

13541354
tasklet_kill(&atchan->tasklet);

drivers/dma/at_hdmac_regs.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,28 +319,27 @@ static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
319319
}
320320

321321

322-
static void atc_setup_irq(struct at_dma_chan *atchan, int on)
322+
static void atc_setup_irq(struct at_dma *atdma, int chan_id, int on)
323323
{
324-
struct at_dma *atdma = to_at_dma(atchan->chan_common.device);
325-
u32 ebci;
324+
u32 ebci;
326325

327326
/* enable interrupts on buffer transfer completion & error */
328-
ebci = AT_DMA_BTC(atchan->chan_common.chan_id)
329-
| AT_DMA_ERR(atchan->chan_common.chan_id);
327+
ebci = AT_DMA_BTC(chan_id)
328+
| AT_DMA_ERR(chan_id);
330329
if (on)
331330
dma_writel(atdma, EBCIER, ebci);
332331
else
333332
dma_writel(atdma, EBCIDR, ebci);
334333
}
335334

336-
static inline void atc_enable_irq(struct at_dma_chan *atchan)
335+
static void atc_enable_chan_irq(struct at_dma *atdma, int chan_id)
337336
{
338-
atc_setup_irq(atchan, 1);
337+
atc_setup_irq(atdma, chan_id, 1);
339338
}
340339

341-
static inline void atc_disable_irq(struct at_dma_chan *atchan)
340+
static void atc_disable_chan_irq(struct at_dma *atdma, int chan_id)
342341
{
343-
atc_setup_irq(atchan, 0);
342+
atc_setup_irq(atdma, chan_id, 0);
344343
}
345344

346345

0 commit comments

Comments
 (0)