Re: [PATCH 5.10.y-cip 15/39] mmc: renesas_sdhi: Add a condition of cmd/data timeout for retune
Lad Prabhakar
Hi Pavel,
Thank you for the review.
toggle quoted message
Show quoted text
Thank you for the review.
-----Original Message-----Agreed.
From: Pavel Machek <pavel@...>
Sent: 31 March 2022 11:19
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...>
Cc: cip-dev@...; Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@...>; Pavel Machek <pavel@...>; Biju Das
<biju.das.jz@...>
Subject: Re: [PATCH 5.10.y-cip 15/39] mmc: renesas_sdhi: Add a condition
of cmd/data timeout for retune
Hi!commit ed2fab9a8229cc70fe03032e48d0ec375df6013e upstream.
According to the datasheet, this controller needs retune when cmd or
data timeout happens. So, add a condition into .check_retune().@@ -790,11 +792,19 @@ static bool renesas_sdhi_check_scc_error(structtmio_mmc_host *host)if (mmc_doing_tune(host->mmc))I'd preffer simple "ret = true" here.
return false;
+ if (((mrq->cmd->error == -ETIMEDOUT) ||
+ (mrq->data && mrq->data->error == -ETIMEDOUT)) &&
+ ((host->mmc->caps & MMC_CAP_NONREMOVABLE) ||
+ (host->ops.get_cd && host->ops.get_cd(host->mmc))))
+ ret |= true;
Cheers,
Prabhakar
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany