Re: [PATCH V5 07/15] mmc: core: Hold re-tuning while bkops ongoing

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

 



On 14 April 2015 at 15:12, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote:
> Hold re-tuning during bkops to prevent
> it from conflicting with the busy state.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> ---
>  drivers/mmc/core/core.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index dbd7a77..4a42174 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -316,6 +316,8 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception)
>         } else {
>                 timeout = 0;
>                 use_busy_signal = false;
> +               /* Hold re-tuning for ongoing bkops */
> +               mmc_retune_hold(card->host);
>         }

I would rather change the behaviour to always hold re-tune, no matter
of "use_busy_signal".
Then don't release re-tune if it's an ongoing BKOPS.

I do understand the hold/release you added in __mmc_switch() will
cover this, but I think this code becomes more clear if you change to
my proposal.

>
>         err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> @@ -324,6 +326,9 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception)
>         if (err) {
>                 pr_warn("%s: Error %d starting bkops\n",
>                         mmc_hostname(card->host), err);
> +               /* bkops not ongoing, so release re-tuning */
> +               if (!use_busy_signal)
> +                       mmc_retune_release(card->host);
>                 goto out;
>         }
>
> @@ -749,6 +754,7 @@ int mmc_stop_bkops(struct mmc_card *card)
>          */
>         if (!err || (err == -EINVAL)) {
>                 mmc_card_clr_doing_bkops(card);
> +               mmc_retune_release(card->host);
>                 err = 0;
>         }
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux