diff mbox series

[v3,1/1] mmc: core: increase the timeout period of the ACMD41 command.

Message ID 20240429071955.163282-1-xiaokeqinhealth@126.com
State Superseded
Headers show
Series [v3,1/1] mmc: core: increase the timeout period of the ACMD41 command. | expand

Commit Message

Felix Qin April 29, 2024, 7:19 a.m. UTC
Extensive testing has shown that some specific SD cards require an
increased command timeout to be successfully initialized.

More info:
Platform: Rockchip SoC + DW Multimedia host Controller
SD card: Xvv microSD CMH34A17TMA12 (Made in Korea)
Note: The SD card is custom-made by the customer in collaboration
with the wafer foundry.

Signed-off-by: Felix Qin <xiaokeqinhealth@126.com>

---
v2: Add more info
v3: Based on the __mmc_poll_for_busy API for modification
---
 drivers/mmc/core/sd_ops.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Avri Altman April 29, 2024, 7:38 p.m. UTC | #1
> Extensive testing has shown that some specific SD cards require an increased
> command timeout to be successfully initialized.
> 
> More info:
> Platform: Rockchip SoC + DW Multimedia host Controller SD card: Xvv microSD
> CMH34A17TMA12 (Made in Korea)
> Note: The SD card is custom-made by the customer in collaboration with the
> wafer foundry.
> 
> Signed-off-by: Felix Qin <xiaokeqinhealth@126.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Dragan Simic April 30, 2024, 1:27 a.m. UTC | #2
Hello Felix,

On 2024-04-29 09:19, Felix Qin wrote:
> Extensive testing has shown that some specific SD cards require an
> increased command timeout to be successfully initialized.
> 
> More info:
> Platform: Rockchip SoC + DW Multimedia host Controller
> SD card: Xvv microSD CMH34A17TMA12 (Made in Korea)
> Note: The SD card is custom-made by the customer in collaboration
> with the wafer foundry.
> 
> Signed-off-by: Felix Qin <xiaokeqinhealth@126.com>

After going through the associated discussion [1] and after
reviewing the associated preparatory patch, [2] this patch is
surely looking good to me.

Reviewed-by: Dragan Simic <dsimic@manjaro.org>

[1] 
https://lore.kernel.org/linux-mmc/CAPDyKFqdA8yisf6tY4gJ-ejk5azTUOZOkZhySYjeHJKibVraLg@mail.gmail.com/
[2] 
https://lore.kernel.org/all/20240425133034.79599-1-ulf.hansson@linaro.org/

> ---
> v2: Add more info
> v3: Based on the __mmc_poll_for_busy API for modification
> ---
>  drivers/mmc/core/sd_ops.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
> index 3ce1ff336826..a1c028303ba7 100644
> --- a/drivers/mmc/core/sd_ops.c
> +++ b/drivers/mmc/core/sd_ops.c
> @@ -19,8 +19,13 @@
>  #include "sd_ops.h"
>  #include "mmc_ops.h"
> 
> +/*
> + * Extensive testing has shown that some specific SD cards
> + * require an increased command timeout to be successfully
> + * initialized.
> + */
>  #define SD_APP_OP_COND_PERIOD_US	(10 * 1000) /* 10ms */
> -#define SD_APP_OP_COND_TIMEOUT_MS	1000 /* 1s */
> +#define SD_APP_OP_COND_TIMEOUT_MS	2000 /* 2s */
> 
>  struct sd_app_op_cond_busy_data {
>  	struct mmc_host *host;
Ulf Hansson May 3, 2024, 1:14 p.m. UTC | #3
On Mon, 29 Apr 2024 at 09:20, Felix Qin <xiaokeqinhealth@126.com> wrote:
>
> Extensive testing has shown that some specific SD cards require an
> increased command timeout to be successfully initialized.
>
> More info:
> Platform: Rockchip SoC + DW Multimedia host Controller
> SD card: Xvv microSD CMH34A17TMA12 (Made in Korea)
> Note: The SD card is custom-made by the customer in collaboration
> with the wafer foundry.
>
> Signed-off-by: Felix Qin <xiaokeqinhealth@126.com>

Applied for next, thanks!

Kind regards
Uffe


>
> ---
> v2: Add more info
> v3: Based on the __mmc_poll_for_busy API for modification
> ---
>  drivers/mmc/core/sd_ops.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
> index 3ce1ff336826..a1c028303ba7 100644
> --- a/drivers/mmc/core/sd_ops.c
> +++ b/drivers/mmc/core/sd_ops.c
> @@ -19,8 +19,13 @@
>  #include "sd_ops.h"
>  #include "mmc_ops.h"
>
> +/*
> + * Extensive testing has shown that some specific SD cards
> + * require an increased command timeout to be successfully
> + * initialized.
> + */
>  #define SD_APP_OP_COND_PERIOD_US       (10 * 1000) /* 10ms */
> -#define SD_APP_OP_COND_TIMEOUT_MS      1000 /* 1s */
> +#define SD_APP_OP_COND_TIMEOUT_MS      2000 /* 2s */
>
>  struct sd_app_op_cond_busy_data {
>         struct mmc_host *host;
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 3ce1ff336826..a1c028303ba7 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -19,8 +19,13 @@ 
 #include "sd_ops.h"
 #include "mmc_ops.h"
 
+/*
+ * Extensive testing has shown that some specific SD cards
+ * require an increased command timeout to be successfully
+ * initialized.
+ */
 #define SD_APP_OP_COND_PERIOD_US	(10 * 1000) /* 10ms */
-#define SD_APP_OP_COND_TIMEOUT_MS	1000 /* 1s */
+#define SD_APP_OP_COND_TIMEOUT_MS	2000 /* 2s */
 
 struct sd_app_op_cond_busy_data {
 	struct mmc_host *host;