diff mbox

mmc: It is not an error for the card to be removed while suspended

Message ID 1450101087-24391-1-git-send-email-adrian.hunter@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adrian Hunter Dec. 14, 2015, 1:51 p.m. UTC
A 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(-)

Comments

Jaehoon Chung Dec. 15, 2015, 4:01 a.m. UTC | #1
Hi, Adrian.

On 12/14/2015 10:51 PM, Adrian Hunter wrote:
> A card can be removed while it is runtime suspended.
> Do not print an error message.

Well, if card is non-removable (in case of eMMC, card can be non-removable),
 it needs to print the error message?
I'm not sure what's correct..but just my opinion.

Best Regards,
Jaehoon Chung

> 
> 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 549c56e8cf6b..bf49e44571f2 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1935,7 +1935,7 @@ static int mmc_runtime_resume(struct mmc_host *host)
>  	int err;
>  
>  	err = _mmc_resume(host);
> -	if (err)
> +	if (err && err != -ENOMEDIUM)
>  		pr_err("%s: error %d doing runtime resume\n",
>  			mmc_hostname(host), err);
>  
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index 8f3b46a56b3d..f2b164b214ae 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -1158,7 +1158,7 @@ static int mmc_sd_runtime_resume(struct mmc_host *host)
>  	int err;
>  
>  	err = _mmc_sd_resume(host);
> -	if (err)
> +	if (err && err != -ENOMEDIUM)
>  		pr_err("%s: error %d doing runtime resume\n",
>  			mmc_hostname(host), err);
>  
> 

--
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
Adrian Hunter Dec. 16, 2015, 8:18 a.m. UTC | #2
On 15/12/15 06:01, Jaehoon Chung wrote:
> On 12/14/2015 10:51 PM, Adrian Hunter wrote:
>> A card can be removed while it is runtime suspended.
>> Do not print an error message.
> 
> Well, if card is non-removable (in case of eMMC, card can be non-removable),
>  it needs to print the error message?
> I'm not sure what's correct..but just my opinion.

I guess this patch should have been a "V2" but the original was so long ago.
Ulf's comment about your concern is here:

	http://marc.info/?l=linux-mmc&m=141163363902017&w=2


>>
>> 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 549c56e8cf6b..bf49e44571f2 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -1935,7 +1935,7 @@ static int mmc_runtime_resume(struct mmc_host *host)
>>  	int err;
>>  
>>  	err = _mmc_resume(host);
>> -	if (err)
>> +	if (err && err != -ENOMEDIUM)
>>  		pr_err("%s: error %d doing runtime resume\n",
>>  			mmc_hostname(host), err);
>>  
>> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
>> index 8f3b46a56b3d..f2b164b214ae 100644
>> --- a/drivers/mmc/core/sd.c
>> +++ b/drivers/mmc/core/sd.c
>> @@ -1158,7 +1158,7 @@ static int mmc_sd_runtime_resume(struct mmc_host *host)
>>  	int err;
>>  
>>  	err = _mmc_sd_resume(host);
>> -	if (err)
>> +	if (err && err != -ENOMEDIUM)
>>  		pr_err("%s: error %d doing runtime resume\n",
>>  			mmc_hostname(host), err);
>>  
>>
> 
> 

--
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
Ulf Hansson Dec. 18, 2015, 9:54 a.m. UTC | #3
On 14 December 2015 at 14:51, Adrian Hunter <adrian.hunter@intel.com> wrote:
> A card can be removed while it is runtime suspended.
> Do not print an error message.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  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 549c56e8cf6b..bf49e44571f2 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1935,7 +1935,7 @@ static int mmc_runtime_resume(struct mmc_host *host)
>         int err;
>
>         err = _mmc_resume(host);
> -       if (err)
> +       if (err && err != -ENOMEDIUM)
>                 pr_err("%s: error %d doing runtime resume\n",
>                         mmc_hostname(host), err);
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index 8f3b46a56b3d..f2b164b214ae 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -1158,7 +1158,7 @@ static int mmc_sd_runtime_resume(struct mmc_host *host)
>         int err;
>
>         err = _mmc_sd_resume(host);
> -       if (err)
> +       if (err && err != -ENOMEDIUM)
>                 pr_err("%s: error %d doing runtime resume\n",
>                         mmc_hostname(host), err);
>
> --
> 1.9.1
>
> --
> 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
--
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 mbox

Patch

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 549c56e8cf6b..bf49e44571f2 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1935,7 +1935,7 @@  static int mmc_runtime_resume(struct mmc_host *host)
 	int err;
 
 	err = _mmc_resume(host);
-	if (err)
+	if (err && err != -ENOMEDIUM)
 		pr_err("%s: error %d doing runtime resume\n",
 			mmc_hostname(host), err);
 
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 8f3b46a56b3d..f2b164b214ae 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1158,7 +1158,7 @@  static int mmc_sd_runtime_resume(struct mmc_host *host)
 	int err;
 
 	err = _mmc_sd_resume(host);
-	if (err)
+	if (err && err != -ENOMEDIUM)
 		pr_err("%s: error %d doing runtime resume\n",
 			mmc_hostname(host), err);