From patchwork Thu Aug 25 09:33:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 1095842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7P9XL5A017257 for ; Thu, 25 Aug 2011 09:33:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751226Ab1HYJdN (ORCPT ); Thu, 25 Aug 2011 05:33:13 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:42110 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867Ab1HYJdM (ORCPT ); Thu, 25 Aug 2011 05:33:12 -0400 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QwWJC-0000sI-R6; Thu, 25 Aug 2011 11:33:10 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.76) (envelope-from ) id 1QwWJC-0005VD-PA; Thu, 25 Aug 2011 11:33:10 +0200 From: Sascha Hauer To: Cc: Sascha Hauer , Chris Ball , linux-mmc@vger.kernel.org Subject: [PATCH v2] mmc mxcmmc: fix falling back to PIO Date: Thu, 25 Aug 2011 11:33:05 +0200 Message-Id: <1314264785-19224-1-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.7.5.4 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Aug 2011 09:33:21 +0000 (UTC) When we can't configure the dma channel we want to fall back to PIO. We do this by setting host->do_dma to zero. This does not work as do_dma is used to see whether dma can be used for the current transfer. Instead, we have to set host->dma to NULL. Signed-off-by: Sascha Hauer Cc: Chris Ball Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/mxcmmc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 14aa213..4dc9008 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -730,7 +730,8 @@ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) dev_err(mmc_dev(host->mmc), "failed to config DMA channel. Falling back to PIO\n"); dma_release_channel(host->dma); - host->do_dma = 0; + host->dma = NULL; + host->dma = 0; } }