On 23 September 2014 22:00, Adrian Hunter <[email protected]> wrote:
> A removable card can be removed while it is runtime suspended.
> Do not print an error message.
>
> Signed-off-by: Adrian Hunter <[email protected]>
> ---
> drivers/mmc/core/mmc.c | 2 +-
> drivers/mmc/core/sd.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index ce11d89..1d827eb 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1804,7 +1804,7 @@ static int mmc_runtime_resume(struct mmc_host *host)
> return 0;
>
> err = _mmc_resume(host);
> - if (err)
> + if (err && (err != -ENOMEDIUM || (host->caps & MMC_CAP_NONREMOVABLE)))
The check for NONREMOVABLE cap shouldn't be needed!? I mean -ENOMEDIUM
can't be set for such devices anyway.
> pr_err("%s: error %d doing aggessive resume\n",
> mmc_hostname(host), err);
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index 2591388..28089b3 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -1178,7 +1178,7 @@ static int mmc_sd_runtime_resume(struct mmc_host *host)
> return 0;
>
> err = _mmc_sd_resume(host);
> - if (err)
> + if (err && (err != -ENOMEDIUM || (host->caps & MMC_CAP_NONREMOVABLE)))
Same comment as above.
> pr_err("%s: error %d doing aggessive resume\n",
> mmc_hostname(host), err);
>
> --
> 1.8.3.2
>
Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html