Patchwork [Lucid,SRU] Revert "ARM: 7220/1: mmc: mmci: Fixup error handling for dma"

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Jan. 24, 2012, 6:09 p.m.
Message ID <1327428574-10915-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/137607/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Jan. 24, 2012, 6:09 p.m.
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

This reverts commit c8cdf3f97d34d906e0519d5cbc2ab3f81269d0b4, applied on
linux 2.6.32.53 stable release, as it can introduce the following build
error while building 2.6.32.y on armel:

linux-2.6.32/drivers/mmc/host/mmci.c: In function 'mmci_cmd_irq':
linux-2.6.32/drivers/mmc/host/mmci.c:237: error: implicit declaration of function 'dma_inprogress'
linux-2.6.32/drivers/mmc/host/mmci.c:238: error: implicit declaration of function 'mmci_dma_data_error'

Aparently the commit was wrongly pushed into 2.6.32, since it depends on
commit c8ebae37 ("ARM: mmci: add dmaengine-based DMA support"), not
present on 2.6.32.

BugLink: https://bugs.launchpad.net/bugs/921113
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 drivers/mmc/host/mmci.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
Tim Gardner - Jan. 24, 2012, 9:44 p.m.
I assume the original stable patch was similarly useless, e.g., it 
didn't address an actual x86 problem ?

rtg
Stefan Bader - Jan. 25, 2012, 11:16 a.m.
On 24.01.2012 19:09, Herton R. Krzesinski wrote:
> From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> 
> This reverts commit c8cdf3f97d34d906e0519d5cbc2ab3f81269d0b4, applied on
> linux 2.6.32.53 stable release, as it can introduce the following build
> error while building 2.6.32.y on armel:
> 
> linux-2.6.32/drivers/mmc/host/mmci.c: In function 'mmci_cmd_irq':
> linux-2.6.32/drivers/mmc/host/mmci.c:237: error: implicit declaration of function 'dma_inprogress'
> linux-2.6.32/drivers/mmc/host/mmci.c:238: error: implicit declaration of function 'mmci_dma_data_error'
> 
> Aparently the commit was wrongly pushed into 2.6.32, since it depends on
> commit c8ebae37 ("ARM: mmci: add dmaengine-based DMA support"), not
> present on 2.6.32.
> 
> BugLink: https://bugs.launchpad.net/bugs/921113
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> ---
>  drivers/mmc/host/mmci.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 68d800f..705a589 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -232,12 +232,8 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
>  	}
>  
>  	if (!cmd->data || cmd->error) {
> -		if (host->data) {
> -			/* Terminate the DMA transfer */
> -			if (dma_inprogress(host))
> -				mmci_dma_data_error(host);
> +		if (host->data)
>  			mmci_stop_data(host);
> -		}
>  		mmci_request_end(host, cmd->mrq);
>  	} else if (!(cmd->data->flags & MMC_DATA_READ)) {
>  		mmci_start_data(host, cmd->data);

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Herton Ronaldo Krzesinski - Jan. 25, 2012, 11:30 a.m.
On Tue, Jan 24, 2012 at 02:44:44PM -0700, Tim Gardner wrote:
> I assume the original stable patch was similarly useless, e.g., it
> didn't address an actual x86 problem ?

yes, the problem shouldn't exist on 2.6.32, and the patch is for an arm
only driver.

> 
> rtg
> -- 
> Tim Gardner tim.gardner@canonical.com
>
Tim Gardner - Jan. 25, 2012, 1:08 p.m.

Patch

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 68d800f..705a589 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -232,12 +232,8 @@  mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
 	}
 
 	if (!cmd->data || cmd->error) {
-		if (host->data) {
-			/* Terminate the DMA transfer */
-			if (dma_inprogress(host))
-				mmci_dma_data_error(host);
+		if (host->data)
 			mmci_stop_data(host);
-		}
 		mmci_request_end(host, cmd->mrq);
 	} else if (!(cmd->data->flags & MMC_DATA_READ)) {
 		mmci_start_data(host, cmd->data);