Re: [PATCH] mmc: dw_mmc: avoid long timeout if register invalid

From: Christian Löhle
Date: Mon Sep 20 2021 - 05:34:42 EST


From: Jesper Nilsson <jesper.nilsson@xxxxxxxx>
Sent: Friday, September 17, 2021 3:41 PM
To: Christian Löhle
Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-mmc@xxxxxxxxxxxxxxx; marten.lindahl@xxxxxxxx; jh80.chung@xxxxxxxxxxx; ulf.hansson@xxxxxxxxxx
Subject: Re: [PATCH] mmc: dw_mmc: avoid long timeout if register invalid

>One second could be to short, we have seen some cards take up
>to 10s on write operations. Although that was quite a few years ago.
>
>TMOUT is only used for reads if I understand correctly,
>so it should be ok anyways.
>
>/Jesper

Yes, apart from it only affecting reads, the calculated timeout is only that high if the register still holds the reset value.
I've only seen and would expect this for initialization 'read' commands, like ACMD13, or ACMD51.
I have chosen 1s to hit an expectation that I would consider normal, that a card is initialized in a couple of seconds after plugging in, or never.

Regards,
Christian=
Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz
Managing Directors: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782