[PATCH] mmc: core: add an error log for cid verification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



when failed to verify the cid, the card initialisation will abort.
it is necessary to print some logs for this critical error.

Signed-off-by: hongjiefang <hongjiefang@xxxxxxxxxxxx>
---
 drivers/mmc/core/mmc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index da892a5..339015c 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1595,6 +1595,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 	if (oldcard) {
 		if (memcmp(cid, oldcard->raw_cid, sizeof(cid)) != 0) {
 			err = -ENOENT;
+			pr_err("%s: Failed to verify the cid, error %d\n",
+				mmc_hostname(host), err);
 			goto err;
 		}
 
-- 
1.9.1




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux