public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Bug in MTD NAND ONFI chipsize detection
@ 2011-05-11 16:25 Nitin Garg
  2011-05-12  1:33 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Nitin Garg @ 2011-05-11 16:25 UTC (permalink / raw)
  To: linux-kernel

Hi All,

The nand_flash_detect_onfi function in mtd/nand detects the NAND flash
device size using the ONFI parameters:
	chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) * mtd->erasesize;

The lun_count is not taken into consideration due to which we detect
wrong size for Micron MT29F8G08ADADAH4 as it has 2 logical units.

We should change the chipsize calculation to:
	chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) *
(uint64_t)le32_to_cpu(p->lun_count) * mtd->erasesize;

Pls suggest.

Regards,
Nitin Garg

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-12 15:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 16:25 Bug in MTD NAND ONFI chipsize detection Nitin Garg
2011-05-12  1:33 ` Andrew Morton
2011-05-12  6:54   ` Nitin Garg
2011-05-12  7:05     ` Nitin Garg
2011-05-12  7:16       ` Nitin Garg
2011-05-12  7:47         ` Matthieu CASTET
2011-05-12 12:34           ` Nitin Garg
2011-05-12 13:53             ` Artem Bityutskiy
2011-05-12 13:53               ` Artem Bityutskiy
2011-05-12 15:19                 ` Nitin Garg
2011-05-12 15:39             ` Matthieu CASTET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox