Bad assumption about ID field definition for Samsung NAND?
Brian Norris
norris at broadcom.com
Thu Aug 19 18:28:13 EDT 2010
On 08/19/2010 12:46 PM, Kevin Cernekee wrote:
> The code is right; the comment is wrong.
In that case, should we fix the comment and add the
check that Tilman mentioned previously? (below)
This looks safe and will at least eliminate a few weird
cases where Samsung SLC happen to have 6-byte ID strings
(such as the K9F4G08U0B in question).
I have another fix I will tack on in series to this; should
I include you as a "Signed-off-by", Tilman?
Brian
> @@ -2852,6 +2852,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
> */
> if (id_data[0] == id_data[6] && id_data[1] == id_data[7] &&
> id_data[0] == NAND_MFR_SAMSUNG &&
> + (chip->cellinfo & NAND_CI_CELLTYPE_MSK) &&
> id_data[5] != 0x00) {
> /* Calc pagesize */
> mtd->writesize = 2048 << (extid & 0x03);
More information about the linux-mtd
mailing list