From patchwork Wed Mar 9 08:06:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chuanxiao.Dong" X-Patchwork-Id: 620651 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p298DoU5005091 for ; Wed, 9 Mar 2011 08:13:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753904Ab1CIINo (ORCPT ); Wed, 9 Mar 2011 03:13:44 -0500 Received: from mga02.intel.com ([134.134.136.20]:6492 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478Ab1CIINn (ORCPT ); Wed, 9 Mar 2011 03:13:43 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 09 Mar 2011 00:13:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.62,289,1297065600"; d="scan'208";a="718071919" Received: from unknown (HELO intel.com) ([172.16.120.198]) by orsmga001.jf.intel.com with ESMTP; 09 Mar 2011 00:13:41 -0800 Date: Wed, 9 Mar 2011 16:06:09 +0800 From: Chuanxiao Dong To: linux-mmc@vger.kernel.org, cjb@laptop.org Cc: kmpark@infradead.org, prakity@marvell.com, jh80.chung@samsung.com, w.sang@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH]mmc: set timeout for SDHCI host before sending busy cmds Message-ID: <20110309080609.GA23207@intel.com> Reply-To: Chuanxiao Dong MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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]); Wed, 09 Mar 2011 08:14:03 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 99c372e..8306323 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -659,8 +659,15 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) WARN_ON(host->data); - if (data == NULL) + if (data == NULL) { + /* + * set the timeout to be maximum value for commands those with + * busy signal + */ + if (host->cmd->flags & MMC_RSP_BUSY) + sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL); return; + } /* Sanity checks */ BUG_ON(data->blksz * data->blocks > 524288);