[PATCH] mmc: mmci: Fixup error handling for dma

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Nov 30 17:21:39 EST 2011


On Tue, Nov 29, 2011 at 03:51:26PM +0100, Ulf Hansson wrote:
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index e900f51..62ad649 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -761,8 +761,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
>  	}
>  
>  	if (!cmd->data || cmd->error) {
> -		if (host->data)
> +		if (host->data) {
> +			/* Terminate the DMA transfer */
> +			if (dma_inprogress(host))
> +				mmci_dma_data_error(host);

Doesn't this leave the DMA buffers mapped?



More information about the linux-arm-kernel mailing list