Skip to contentSkip to conversation

fix the c_size, in CSD Version 2.0, it's 22 bits

PATCH New Xiangfu Liu 2 participants 3 messages Aug 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix the c_size, in CSD Version 2.0, it's 22 bits

---
 include/mmc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/mmc.h +1 -1
index fcb237e..b913a60 100644
@@ -189,12 +189,12 @@ struct mmc_csd
 	u8	tran_speed;
 	u16	ccc:12,
 		read_bl_len:4;
+	u32	c_size:22;
 	u64	read_bl_partial:1,
 		write_blk_misalign:1,
 		read_blk_misalign:1,
 		dsr_imp:1,
 		rsvd2:2,
-		c_size:12,
 		vdd_r_curr_min:3,
 		vdd_r_curr_max:3,
 		vdd_w_curr_min:3,
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 fix the c_size, in CSD Version 2.0, it's 22 bits

Quoted 13 lines · Xiangfu Liu
---
 include/mmc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/mmc.h +0 -0
index fcb237e..b913a60 100644
@@ -189,12 +189,12 @@ struct mmc_csd
 	u8	tran_speed;
 	u16	ccc:12,
 		read_bl_len:4;

include/mmc.h struct mmc_csd · line 200

Quoted 10 lines
include/mmc.h +1 -1
+	u32	c_size:22;
 	u64	read_bl_partial:1,
 		write_blk_misalign:1,
 		read_blk_misalign:1,
 		dsr_imp:1,
 		rsvd2:2,
-		c_size:12,
 		vdd_r_curr_min:3,
 		vdd_r_curr_max:3,
 		vdd_w_curr_min:3,

NAK

This structure approach is awfully broken. LE/BE
issues, c_size spans over a 32 bit boundary!

The generic MMC works fine with no such structure.

I already proposed in earlier patches to finally
remove that structure.

Reinhard

#2 lore raw

PATCH 1/1 fix the c_size, in CSD Version 2.0, it's 22 bits

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Reinhard

thanks for reply.

Quoted 30 lines · Reinhard Meyer
Quoted 13 lines · Xiangfu Liu
---
 include/mmc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/mmc.h +0 -0
index fcb237e..b913a60 100644
@@ -189,12 +189,12 @@ struct mmc_csd
 	u8	tran_speed;
 	u16	ccc:12,
 		read_bl_len:4;

include/mmc.h struct mmc_csd · line 200

Quoted 10 lines
include/mmc.h +1 -1
+	u32	c_size:22;
 	u64	read_bl_partial:1,
 		write_blk_misalign:1,
 		read_blk_misalign:1,
 		dsr_imp:1,
 		rsvd2:2,
-		c_size:12,
 		vdd_r_curr_min:3,
 		vdd_r_curr_max:3,
 		vdd_w_curr_min:3,

NAK

This structure approach is awfully broken. LE/BE
issues, c_size spans over a 32 bit boundary!

Quoted 7 lines

The generic MMC works fine with no such structure.

I already proposed in earlier patches to finally
remove that structure.

Reinhard

- --
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx7pNoACgkQRRAEFRxkgLRivQCglcRpN3tjUs2ptn3l4e6+JvW0 gV0Aniqr8mgjF3DjR+M70a66DSvte4ew
=xfDj
-----END PGP SIGNATURE-----