summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sd.c
diff options
context:
space:
mode:
authorhongjiefang <hongjiefang@asrmicro.com>2019-02-28 14:08:28 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2019-02-28 09:28:27 +0100
commit099b648116090acf0c65c8df867aa1cb42476f3b (patch)
treeccf3ca89bac7cbf0f84b0ebae0c5f5afe3df70d3 /drivers/mmc/core/sd.c
parent82b6248705cccc4341b4c1d4a80a70f018198db0 (diff)
downloadlinux-099b648116090acf0c65c8df867aa1cb42476f3b.tar.gz
linux-099b648116090acf0c65c8df867aa1cb42476f3b.tar.bz2
linux-099b648116090acf0c65c8df867aa1cb42476f3b.zip
mmc: core: Add a debug print when the card may have been replaced
If the card was removed in suspended state and a new one was inserted, print a debug log when the check detects that it's not the old card. Signed-off-by: hongjiefang <hongjiefang@asrmicro.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r--drivers/mmc/core/sd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 2b4fc2205b53..265e1aeeb9d8 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -951,8 +951,11 @@ retry:
return err;
if (oldcard) {
- if (memcmp(cid, oldcard->raw_cid, sizeof(cid)) != 0)
+ if (memcmp(cid, oldcard->raw_cid, sizeof(cid)) != 0) {
+ pr_debug("%s: Perhaps the card was replaced\n",
+ mmc_hostname(host));
return -ENOENT;
+ }
card = oldcard;
} else {