* [PATCH] ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
@ 2013-03-13 16:11 Johan Hovold
2013-03-15 10:56 ` Ludovic Desroches
[not found] ` <46568.1708221838$1363345027@news.gmane.org>
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2013-03-13 16:11 UTC (permalink / raw)
To: linux-arm-kernel
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.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
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(-)
diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig
index 606d48f..8aab786 100644
--- a/arch/arm/configs/at91sam9g45_defconfig
+++ b/arch/arm/configs/at91sam9g45_defconfig
@@ -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
diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig
index 0421498..9791820 100644
--- a/arch/avr32/configs/favr-32_defconfig
+++ b/arch/avr32/configs/favr-32_defconfig
@@ -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
diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig
index 3befab9..65de443 100644
--- a/arch/avr32/configs/merisc_defconfig
+++ b/arch/avr32/configs/merisc_defconfig
@@ -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
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 8d13c65..009dabd 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 722af1d..10f8b73 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -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);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
2013-03-13 16:11 [PATCH] ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload Johan Hovold
@ 2013-03-15 10:56 ` Ludovic Desroches
[not found] ` <46568.1708221838$1363345027@news.gmane.org>
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Desroches @ 2013-03-15 10:56 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 13, 2013 at 05:11:59PM +0100, Johan Hovold wrote:
> 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.
>
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Johan Hovold <jhovold@gmail.com>
Hi Johan,
Good point so
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Thanks
> ---
> 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(-)
>
> diff --git a/arch/arm/configs/at91sam9g45_defconfig b/arch/arm/configs/at91sam9g45_defconfig
> index 606d48f..8aab786 100644
> --- a/arch/arm/configs/at91sam9g45_defconfig
> +++ b/arch/arm/configs/at91sam9g45_defconfig
> @@ -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
> diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig
> index 0421498..9791820 100644
> --- a/arch/avr32/configs/favr-32_defconfig
> +++ b/arch/avr32/configs/favr-32_defconfig
> @@ -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
> diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig
> index 3befab9..65de443 100644
> --- a/arch/avr32/configs/merisc_defconfig
> +++ b/arch/avr32/configs/merisc_defconfig
> @@ -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
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 8d13c65..009dabd 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -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
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 722af1d..10f8b73 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -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);
> --
> 1.8.1.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
[not found] ` <46568.1708221838$1363345027@news.gmane.org>
@ 2013-03-22 16:58 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2013-03-22 16:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, Mar 15 2013, Ludovic Desroches wrote:
> On Wed, Mar 13, 2013 at 05:11:59PM +0100, Johan Hovold wrote:
>> 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.
>>
>> Cc: stable <stable@vger.kernel.org>
>> Signed-off-by: Johan Hovold <jhovold@gmail.com>
>
> Hi Johan,
>
> Good point so
>
> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Thanks, I'll merge this via the MMC tree if no-one objects.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-22 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 16:11 [PATCH] ARM: at91/avr32/atmel-mci: fix DMA-channel leak on module unload Johan Hovold
2013-03-15 10:56 ` Ludovic Desroches
[not found] ` <46568.1708221838$1363345027@news.gmane.org>
2013-03-22 16:58 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).