Re: [PATCH v3 2/2] mmc: core: Let sanitize not retry in case of timeout/failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2 Apr 2021 at 11:24, Bean Huo <huobean@xxxxxxxxx> wrote:
>
> From: Bean Huo <beanhuo@xxxxxxxxxx>
>
> Not any commands need to retry in case of timeout/failure.
> Currently, the sanitize command is issued by the IOCTL interface,
> and once its timeouts, the user normally decides to retry or not .
> Just blindly retry three times sanitize in the driver, it doesn't
> help sanitize retry succeed in the end, on the contrary, it only
> makes the user feel sanitize timeouts after 12 minutes.
>
> Signed-off-by: Bean Huo <beanhuo@xxxxxxxxxx>
> ---
>  drivers/mmc/core/block.c   | 13 +++++++----
>  drivers/mmc/core/mmc.c     | 47 ++++++++++++++++++++++----------------
>  drivers/mmc/core/mmc_ops.c | 19 +++++++--------
>  drivers/mmc/core/mmc_ops.h |  4 ++--
>  4 files changed, 47 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index 8bfd4d95b386..9778093d7006 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -836,7 +836,7 @@ static inline int mmc_blk_part_switch(struct mmc_card *card,
>
>                 ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>                                  EXT_CSD_PART_CONFIG, part_config,
> -                                card->ext_csd.part_time);
> +                                card->ext_csd.part_time, MMC_CMD_RETRIES);

I would rather not change the mmc_switch() function definition, but
only __mmc_switch(). Just let mmc_switch() pass another in-parameter
(MMC_CMD_RETRIES) to __mmc_switch(), which means all callers of
mmc_switch() doesn't need to get changed, but only callers of
__mmc_switch().

[...]

Kind regards
Uffe



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux