diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2012-12-07 17:02:47 +0000 | 
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2012-12-07 17:02:47 +0000 | 
| commit | 7730cba2a50332c194f50a58b86359ea39a82bd1 (patch) | |
| tree | 64c8d7228da1454c02288068e57a9c61f8b0acd0 /drivers/mtd/nand/nand_base.c | |
| parent | c20151dff8a6d503c0d0cc4387c33a618cdabcb7 (diff) | |
| parent | b69f0859dc8e633c5d8c06845811588fe17e68b3 (diff) | |
| download | olio-linux-3.10-7730cba2a50332c194f50a58b86359ea39a82bd1.tar.xz olio-linux-3.10-7730cba2a50332c194f50a58b86359ea39a82bd1.zip  | |
Merge tag 'v3.7-rc8' into spi/next
Linux 3.7-rc8
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ec6841d8e95..1a03b7f673c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2983,13 +2983,15 @@ static void nand_decode_ext_id(struct mtd_info *mtd, struct nand_chip *chip,  	/*  	 * Field definitions are in the following datasheets:  	 * Old style (4,5 byte ID): Samsung K9GAG08U0M (p.32) -	 * New style   (6 byte ID): Samsung K9GAG08U0F (p.44) +	 * New Samsung (6 byte ID): Samsung K9GAG08U0F (p.44)  	 * Hynix MLC   (6 byte ID): Hynix H27UBG8T2B (p.22)  	 * -	 * Check for ID length, cell type, and Hynix/Samsung ID to decide what -	 * to do. +	 * Check for ID length, non-zero 6th byte, cell type, and Hynix/Samsung +	 * ID to decide what to do.  	 */ -	if (id_len == 6 && id_data[0] == NAND_MFR_SAMSUNG) { +	if (id_len == 6 && id_data[0] == NAND_MFR_SAMSUNG && +			(chip->cellinfo & NAND_CI_CELLTYPE_MSK) && +			id_data[5] != 0x00) {  		/* Calc pagesize */  		mtd->writesize = 2048 << (extid & 0x03);  		extid >>= 2;  |