From patchwork Wed Apr 29 17:03:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 6297151 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 16881BEEE1 for ; Wed, 29 Apr 2015 17:04:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28E8B20154 for ; Wed, 29 Apr 2015 17:04:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD58B2010F for ; Wed, 29 Apr 2015 17:04:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762AbbD2RES (ORCPT ); Wed, 29 Apr 2015 13:04:18 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35914 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753701AbbD2RER (ORCPT ); Wed, 29 Apr 2015 13:04:17 -0400 Received: by pabsx10 with SMTP id sx10so33117054pab.3; Wed, 29 Apr 2015 10:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6knihRAhB4Ph+y342s3WjMVXNoICz//KuJlHPWbY/sc=; b=P4p2VLjjxVIlyzgn+VPSoJYm0MLOvBTtrP2eqQzor0yszoSd8mNA/DKIe7YfIWIXcM ge5hC2ozRolBqxCPG+8FWs68ArQ6HC7qAAQkFsHq5k+noTMHBzTrIS7MQEyd7dGnf9Pn yida2IkGOUTeQusfJNt1hAXpt4ve9xenZuVccAIv9vShKme08tl01kQdX/btsOY82HZh rm302KrxQ1YdwnWaVkxQBLAYmK8tyMI9tkw9XbZ/dXdFwkKj0uBwWN2jZopmdA6/mw3D /h4DwTApT1G9bEeejtGJtjMA+SyAkHRiBcamXs0fu8ksjDQ6lk+v8m3iYPB6wZQRHngw QVWQ== X-Received: by 10.66.150.196 with SMTP id uk4mr145705pab.54.1430327057030; Wed, 29 Apr 2015 10:04:17 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by mx.google.com with ESMTPSA id by8sm26088867pab.16.2015.04.29.10.04.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 10:04:16 -0700 (PDT) From: Yoshihiro Kaneko To: linux-mmc@vger.kernel.org Cc: Chris Ball , Ulf Hansson , Simon Horman , Magnus Damm , Kuninori Morimoto , linux-sh@vger.kernel.org Subject: [PATCH/RFC] mmc: sh_mmcif: Fix timeout value for command request Date: Thu, 30 Apr 2015 02:03:51 +0900 Message-Id: <1430327031-8349-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout") changed the timeout value from 1000 jiffies to 1s. In the case where HZ is 1000 the values are the same. However, for smaller HZ values the timeout is now smaller, 1s instead of 10s in the case of HZ=100. Since the timeout occurs in spite of a normal data transfer a timeout of 10s seems more appropriate. This restores the previous timeout in the case where HZ=100 and results in an increase over the previous timeout for larger values of HZ. Fixes: f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout") Signed-off-by: Takeshi Kihara [horms: rewrote changelog to refer to HZ] Signed-off-by: Simon Horman Signed-off-by: Yoshihiro Kaneko --- This patch is based on the for-next branch of Mark Brown's spi tree. A survey of the HZ resulting from of defconfigs that enable MMCIF is as follows: bockw_defconfig: CONFIG_HZ=1024 kzm9g_defconfig: CONFIG_HZ=128 multi_v7_defconfig: CONFIG_HZ=200 shmobile_defconfig: CONFIG_HZ=100 Simon Horman, SH Mobile maintainer, notes that it is the last defconfig that is recommended for use at this time. drivers/mmc/host/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 072f670..b82b982 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1411,7 +1411,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) host = mmc_priv(mmc); host->mmc = mmc; host->addr = reg; - host->timeout = msecs_to_jiffies(1000); + host->timeout = msecs_to_jiffies(10000); host->ccs_enable = !pd || !pd->ccs_unsupported; host->clk_ctrl2_enable = pd && pd->clk_ctrl2_present;