ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
Subsystems (5)
PATCH 1/1 ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
Fix regression introduced by commit 796211b7953 ("mmc: atmel-mci: add pdc support and runtime capabilities detection") which removed the need for CONFIG_MMC_ATMELMCI_DMA but kept the Kconfig-entry as well as the compile guards around dma_release_channel() in remove(). Consequently, DMA is always enabled (if supported), but the DMA-channel is not released on module unload unless the DMA-config option is selected.
Remove the no longer used CONFIG_MMC_ATMELMCI_DMA option completely.
--- arch/arm/configs/at91sam9g45_defconfig | 1 - arch/avr32/configs/favr-32_defconfig | 1 - arch/avr32/configs/merisc_defconfig | 1 - drivers/mmc/host/Kconfig | 10 ---------- drivers/mmc/host/atmel-mci.c | 2 -- 5 files changed, 15 deletions(-)
arch/arm/configs/at91sam9g45_defconfig +0 -1
@@ -173,7 +173,6 @@ CONFIG_MMC=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_SDIO_UART=m CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_LEDS_ATMEL_PWM=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_TIMER=y
arch/avr32/configs/favr-32_defconfig +0 -1
@@ -122,7 +122,6 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_CDC_COMPOSITE=m CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=m
arch/avr32/configs/merisc_defconfig +0 -1
@@ -102,7 +102,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=y
drivers/mmc/host/Kconfig +0 -10
@@ -292,16 +292,6 @@ config MMC_ATMELMCI If unsure, say N. -config MMC_ATMELMCI_DMA - bool "Atmel MCI DMA support" - depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE - help - Say Y here to have the Atmel MCI driver use a DMA engine to - do data transfers and thus increase the throughput and - reduce the CPU utilization. - - If unsure, say N. - config MMC_MSM tristate "Qualcomm SDCC Controller Support" depends on MMC && ARCH_MSM
drivers/mmc/host/atmel-mci.c +0 -2
@@ -2487,10 +2487,8 @@ static int __exit atmci_remove(struct platform_device *pdev)atmci_readl (host,ATMCI_SR );clk_disable (host->mck); -#ifdef CONFIG_MMC_ATMELMCI_DMA if (host->dma.chan)dma_release_channel (host->dma.chan); -#endif free_irq (platform_get_irq (pdev,0 ), host);iounmap (host->regs);
Signature · 1 line
1.8.1.5
Quoted 11 lines · Johan Hovold
Fix regression introduced by commit
796211b7953("mmc: atmel-mci: add pdc support and runtime capabilities detection") which removed the need forCONFIG_MMC_ATMELMCI_DMAbut kept the Kconfig-entry as well as the compile guards arounddma_release_channel()inremove(). Consequently, DMA is always enabled (if supported), but the DMA-channel is not released on module unload unless the DMA-config option is selected.Remove the no longer used
CONFIG_MMC_ATMELMCI_DMAoption completely.Cc stable <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Hi Johan,
Good point so
Thanks
Quoted 83 lines
--- arch/arm/configs/at91sam9g45_defconfig | 1 - arch/avr32/configs/favr-32_defconfig | 1 - arch/avr32/configs/merisc_defconfig | 1 - drivers/mmc/host/Kconfig | 10 ---------- drivers/mmc/host/atmel-mci.c | 2 -- 5 files changed, 15 deletions(-)arch/arm/configs/at91sam9g45_defconfig +0
-1@@ -173,7 +173,6 @@ CONFIG_MMC=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_SDIO_UART=m CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_LEDS_ATMEL_PWM=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_TIMER=yarch/avr32/configs/favr-32_defconfig +0
-1@@ -122,7 +122,6 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_CDC_COMPOSITE=m CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=march/avr32/configs/merisc_defconfig +0
-1@@ -102,7 +102,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=ydrivers/mmc/host/Kconfig +0
-10@@ -292,16 +292,6 @@ config MMC_ATMELMCI If unsure, say N. -config MMC_ATMELMCI_DMA - bool "Atmel MCI DMA support" - depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE - help - Say Y here to have the Atmel MCI driver use a DMA engine to - do data transfers and thus increase the throughput and - reduce the CPU utilization. - - If unsure, say N. - config MMC_MSM tristate "Qualcomm SDCC Controller Support" depends on MMC && ARCH_MSMdrivers/mmc/host/atmel-mci.c +0
-2@@ -2487,10 +2487,8 @@ static int __exit atmci_remove(struct platform_device *pdev)atmci_readl (host,ATMCI_SR );clk_disable (host->mck); -#ifdef CONFIG_MMC_ATMELMCI_DMA if (host->dma.chan)dma_release_channel (host->dma.chan); -#endif free_irq (platform_get_irq (pdev,0 ), host);iounmap (host->regs);Signature · 1 line
1.8.1.5
Hi,
Quoted 10 lines · Ludovic Desroches
Quoted 9 lines · Johan Hovold
Fix regression introduced by commit
796211b7953("mmc: atmel-mci: add pdc support and runtime capabilities detection") which removed the need forCONFIG_MMC_ATMELMCI_DMAbut kept the Kconfig-entry as well as the compile guards arounddma_release_channel()inremove(). Consequently, DMA is always enabled (if supported), but the DMA-channel is not released on module unload unless the DMA-config option is selected.Remove the no longer used
CONFIG_MMC_ATMELMCI_DMAoption completely.
Quoted 8 lines
Quoted 2 lines
Cc stable <[email protected]>Signed-off-by Johan Hovold <[email protected]>Hi Johan,
Good point so
Thanks, I'll merge this via the MMC tree if no-one objects.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
PATCH 1/1 ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
In reply to Johan HovoldQuoted 11 lines · Johan Hovold
Fix regression introduced by commit
796211b7953("mmc: atmel-mci: add pdc support and runtime capabilities detection") which removed the need forCONFIG_MMC_ATMELMCI_DMAbut kept the Kconfig-entry as well as the compile guards arounddma_release_channel()inremove(). Consequently, DMA is always enabled (if supported), but the DMA-channel is not released on module unload unless the DMA-config option is selected.Remove the no longer used
CONFIG_MMC_ATMELMCI_DMAoption completely.Cc stable <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Hi Johan,
Good point so
Thanks
Quoted 83 lines
--- arch/arm/configs/at91sam9g45_defconfig | 1 - arch/avr32/configs/favr-32_defconfig | 1 - arch/avr32/configs/merisc_defconfig | 1 - drivers/mmc/host/Kconfig | 10 ---------- drivers/mmc/host/atmel-mci.c | 2 -- 5 files changed, 15 deletions(-)arch/arm/configs/at91sam9g45_defconfig +0
-1@@ -173,7 +173,6 @@ CONFIG_MMC=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_SDIO_UART=m CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_LEDS_ATMEL_PWM=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_TIMER=yarch/avr32/configs/favr-32_defconfig +0
-1@@ -122,7 +122,6 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_CDC_COMPOSITE=m CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=march/avr32/configs/merisc_defconfig +0
-1@@ -102,7 +102,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=ydrivers/mmc/host/Kconfig +0
-10@@ -292,16 +292,6 @@ config MMC_ATMELMCI If unsure, say N. -config MMC_ATMELMCI_DMA - bool "Atmel MCI DMA support" - depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE - help - Say Y here to have the Atmel MCI driver use a DMA engine to - do data transfers and thus increase the throughput and - reduce the CPU utilization. - - If unsure, say N. - config MMC_MSM tristate "Qualcomm SDCC Controller Support" depends on MMC && ARCH_MSMdrivers/mmc/host/atmel-mci.c +0
-2@@ -2487,10 +2487,8 @@ static int __exit atmci_remove(struct platform_device *pdev)atmci_readl (host,ATMCI_SR );clk_disable (host->mck); -#ifdef CONFIG_MMC_ATMELMCI_DMA if (host->dma.chan)dma_release_channel (host->dma.chan); -#endif free_irq (platform_get_irq (pdev,0 ), host);iounmap (host->regs);Signature · 1 line
1.8.1.5