Skip to contentSkip to conversation

SD card fix

PATCH New Marek Vasut 1 participant 1 message Jul 3, 2008 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SD card fix

Hi,
while I was tinkering with palmtx and preparing it for mainline, I noticed, that certain SD cards doesnt work (both Kingston - made by Toshiba).

I came across this
http://kerneltrap.org/mailarchive/linux-kernel/2007/9/28/325179
The person there had the same problem.

The attached patch fixed it for me, but this solution isnt definitelly correct. Though it should point out what's the actual problem very well.

include/linux/mmc/card.h +1 -1
index 0d508ac..ce7828e 100644
@@ -85,7 +85,6 @@ struct mmc_card {
 	struct mmc_host		*host;		/* the host this device belongs to */
 	struct device		dev;		/* the device */
 	unsigned int		rca;		/* relative card address of device */
-	unsigned int		type;		/* card type */
 #define MMC_TYPE_MMC		0		/* MMC card */
 #define MMC_TYPE_SD		1		/* SD card */
 #define MMC_TYPE_SDIO		2		/* SDIO card */
@@ -98,6 +97,7 @@ struct mmc_card {
 	u32			raw_cid[4];	/* raw card CID */
 	u32			raw_csd[4];	/* raw card CSD */
 	u32			raw_scr[2];	/* raw card SCR */
+	unsigned int		type;		/* card type */
 	struct mmc_cid		cid;		/* card identification */
 	struct mmc_csd		csd;		/* card specific */
 	struct mmc_ext_csd	ext_csd;	/* mmc v4 extended card specific */