Skip to contentSkip to conversation

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

PATCH Applied Adrian Hunter 3 participants 4 messages Dec 14, 2015 – Dec 18, 2015 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

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

A card can be removed while it is runtime suspended. Do not print an error message.

---
 drivers/mmc/core/mmc.c | 2 +-
 drivers/mmc/core/sd.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc.c +1 -1
index 549c56e8cf6b..bf49e44571f2 100644
@@ -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);
 
drivers/mmc/core/sd.c +1 -1
index 8f3b46a56b3d..f2b164b214ae 100644
@@ -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);
 
Signature · 1 line
1.9.1
#1 lore raw

Hi, Adrian.

Quoted 2 lines · Adrian Hunter

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

Quoted 34 lines
---
 drivers/mmc/core/mmc.c | 2 +-
 drivers/mmc/core/sd.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc.c +1 -1
index 549c56e8cf6b..bf49e44571f2 100644
@@ -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);
 
drivers/mmc/core/sd.c +1 -1
index 8f3b46a56b3d..f2b164b214ae 100644
@@ -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);
 
#2 lore raw
Quoted 7 lines · Jaehoon Chung
Quoted 2 lines · Adrian Hunter

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
Quoted 36 lines
Quoted 34 lines
---
 drivers/mmc/core/mmc.c | 2 +-
 drivers/mmc/core/sd.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc.c +1 -1
index 549c56e8cf6b..bf49e44571f2 100644
@@ -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);
 
drivers/mmc/core/sd.c +1 -1
index 8f3b46a56b3d..f2b164b214ae 100644
@@ -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);
 
Applied
#3 lore raw
In reply to Adrian Hunter
Quoted 4 lines · Adrian Hunter

A card can be removed while it is runtime suspended. Do not print an error message.

Thanks, applied for next!

Kind regards
Uffe

Quoted 38 lines
---
 drivers/mmc/core/mmc.c | 2 +-
 drivers/mmc/core/sd.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc.c +1 -1
index 549c56e8cf6b..bf49e44571f2 100644
@@ -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);
 
drivers/mmc/core/sd.c +1 -2
index 8f3b46a56b3d..f2b164b214ae 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html