lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5212d8d7-7e77-b874-8f85-7948c03b5748@samsung.com>
Date:   Thu, 23 Sep 2021 07:52:38 +0900
From:   Jaehoon Chung <jh80.chung@...sung.com>
To:     Christian Löhle <CLoehle@...erstone.com>,
        "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: dw_mmc: Dont wait for DRTO on Write RSP error

Hi Chritstian,

On 9/16/21 2:59 PM, Christian Löhle wrote:
> Only wait for DRTO on reads, otherwise the driver hangs.
> 
> The driver prevents sending CMD12 on response errors like CRCs.
> According to the comment this is because some cards have problems
> with this during the UHS tuning sequence.
> Unfortunately this workaround currently also applies for any command
> with data.
> On reads this will set the drto timer which then triggers after a while.
> On writes this will not set any timer and the tasklet will not be
> scheduled again.
> I cannot attest for the UHS workarounds need, but even if so, it should
> at most apply to reads.
> I have observed many hangs when CMD25 response contained a CRC error.
> This patch fixes this without touching the actual UHS tuning workaround.

Sorry for reply too late. I'm checking your patch on my target. 
I will share the result.

Best Regards,
Jaehoon Chung

> 
> Signed-off-by: Christian Loehle <cloehle@...erstone.com>
> ---
>  drivers/mmc/host/dw_mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 6578cc64ae9e..22cf13dc799b 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2081,7 +2081,8 @@ static void dw_mci_tasklet_func(struct tasklet_struct *t)
>  				 * delayed. Allowing the transfer to take place
>  				 * avoids races and keeps things simple.
>  				 */
> -				if (err != -ETIMEDOUT) {
> +				if (err != -ETIMEDOUT &&
> +				    host->dir_status == DW_MCI_RECV_STATUS) {
>  					state = STATE_SENDING_DATA;
>  					continue;
>  				}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ