Message ID | 1411502430-25535-4-git-send-email-adrian.hunter@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 23 September 2014 22:00, Adrian Hunter <adrian.hunter@intel.com> wrote: > A removable card can be removed while it is runtime suspended. > Do not print an error message. > > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> > --- > 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 25/09/2014 11:27 a.m., Ulf Hansson wrote: > On 23 September 2014 22:00, Adrian Hunter <adrian.hunter@intel.com> wrote: >> A removable card can be removed while it is runtime suspended. >> Do not print an error message. >> >> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> >> --- >> 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. So it would be a bug if it did return -ENOMEDIUM so we should definitely print the error message, which is what the code does. > >> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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))) 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))) pr_err("%s: error %d doing aggessive resume\n", mmc_hostname(host), err);
A removable card can be removed while it is runtime suspended. Do not print an error message. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> --- drivers/mmc/core/mmc.c | 2 +- drivers/mmc/core/sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)