diff mbox

[PATCH/RFC] mmc: sh_mmcif: Fix timeout value for command request

Message ID 1430327031-8349-1-git-send-email-ykaneko0929@gmail.com (mailing list archive)
State RFC
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Yoshihiro Kaneko April 29, 2015, 5:03 p.m. UTC
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

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 <takeshi.kihara.df@renesas.com>
[horms: rewrote changelog to refer to HZ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---

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(-)

Comments

Ulf Hansson May 6, 2015, 10 a.m. UTC | #1
On 29 April 2015 at 19:03, Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> 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 <takeshi.kihara.df@renesas.com>
> [horms: rewrote changelog to refer to HZ]
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>

Thanks, applied for fixes!

Kind regards
Uffe

> ---
>
> 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;
>
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;