/* * We only understand CSD structure v1.1 and v2. * v2 has extra information in bits 15, 11 and 10. */ csd_struct = UNSTUFF_BITS(resp, 126, 2); if (csd_struct != 1 && csd_struct != 2) { printk("%s: unrecognised CSD structure version %d\n", mmc_hostname(card->host), csd_struct); mmc_card_set_bad(card); return; 
if (mmc_card_sd(card)) { csd_struct = UNSTUFF_BITS(resp, 126, 2); if (csd_struct != 0) { printk("%s: unrecognised CSD structure version %d\n", mmc_hostname(card->host), csd_struct); mmc_card_set_bad(card); return; }  m = UNSTUFF_BITS(resp, 115, 4); e = UNSTUFF_BITS(resp, 112, 3); csd->tacc_ns	 = (tacc_exp[e] * tacc_mant[m] + 9) / 10; csd->tacc_clks	 = UNSTUFF_BITS(resp, 104, 8) * 100;  m = UNSTUFF_BITS(resp, 99, 4); e = UNSTUFF_BITS(resp, 96, 3); csd->max_dtr	  = tran_exp[e] * tran_mant[m]; csd->cmdclass	  = UNSTUFF_BITS(resp, 84, 12);  e = UNSTUFF_BITS(resp, 47, 3); m = UNSTUFF_BITS(resp, 62, 12); csd->capacity	  = (1 + m) << (e + 2);  csd->read_blkbits = UNSTUFF_BITS(resp, 80, 4); 
static void mmc_decode_csd(struct mmc_card *card){	struct mmc_csd *csd = &card->csd;	unsigned int e, m, csd_struct;	u32 *resp = card->raw_csd;	/*	 * We only understand CSD structure v1.1 and v2.	 * v2 has extra information in bits 15, 11 and 10.	 */	csd_struct = UNSTUFF_BITS(resp, 126, 2);	if (csd_struct != 1 && csd_struct != 2) {		printk("%s: unrecognised CSD structure version %d\n",			mmc_hostname(card->host), csd_struct);		mmc_card_set_bad(card);		return;	}	csd->mmca_vsn	 = UNSTUFF_BITS(resp, 122, 4);	m = UNSTUFF_BITS(resp, 115, 4);	e = UNSTUFF_BITS(resp, 112, 3);	csd->tacc_ns	 = (tacc_exp[e] * tacc_mant[m] + 9) / 10;	csd->tacc_clks	 = UNSTUFF_BITS(resp, 104, 8) * 100;	m = UNSTUFF_BITS(resp, 99, 4);	e = UNSTUFF_BITS(resp, 96, 3);	csd->max_dtr	  = tran_exp[e] * tran_mant[m];	csd->cmdclass	  = UNSTUFF_BITS(resp, 84, 12);	e = UNSTUFF_BITS(resp, 47, 3);	m = UNSTUFF_BITS(resp, 62, 12);	csd->capacity	  = (1 + m) << (e + 2);	csd->read_blkbits = UNSTUFF_BITS(resp, 80, 4);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/335eadf2ef6a1122a720aea98e758e5d431da87d/mmc.c/buggy/drivers/mmc/mmc.c