diff mbox

+ mmc-avoid-getting-cid-on-sdio-only-cards.patch added to -mm tree

Message ID 201008192259.o7JMx8xn013449@imap1.linux-foundation.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Andrew Morton Aug. 19, 2010, 10:59 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/mmc/core/sdio.c~mmc-avoid-getting-cid-on-sdio-only-cards drivers/mmc/core/sdio.c
--- a/drivers/mmc/core/sdio.c~mmc-avoid-getting-cid-on-sdio-only-cards
+++ a/drivers/mmc/core/sdio.c
@@ -362,9 +362,8 @@  static int mmc_sdio_init_card(struct mmc
 		goto err;
 	}
 
-	err = mmc_sd_get_cid(host, host->ocr & ocr, card->raw_cid);
-
-	if (!err) {
+	if (ocr & R4_MEMORY_PRESENT
+	    && mmc_sd_get_cid(host, host->ocr & ocr, card->raw_cid) == 0) {
 		card->type = MMC_TYPE_SD_COMBO;
 
 		if (oldcard && (oldcard->type != MMC_TYPE_SD_COMBO ||
diff -puN include/linux/mmc/sdio.h~mmc-avoid-getting-cid-on-sdio-only-cards include/linux/mmc/sdio.h
--- a/include/linux/mmc/sdio.h~mmc-avoid-getting-cid-on-sdio-only-cards
+++ a/include/linux/mmc/sdio.h
@@ -38,6 +38,8 @@ 
  *      [8:0] Byte/block count
  */
 
+#define R4_MEMORY_PRESENT (1 << 27)
+
 /*
   SDIO status in R5
   Type