From: Andrew Morton <akpm@linux-foundation.org>
To: Nitin Garg <nitingarg98@gmail.com>
Cc: linux-kernel@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org
Subject: Re: Bug in MTD NAND ONFI chipsize detection
Date: Wed, 11 May 2011 18:33:22 -0700 [thread overview]
Message-ID: <20110511183322.da0739c9.akpm@linux-foundation.org> (raw)
In-Reply-To: <BANLkTi=e1mUTX4X7ui+HVCGh=sZ=HLoNCw@mail.gmail.com>
On Wed, 11 May 2011 11:25:22 -0500 Nitin Garg <nitingarg98@gmail.com> wrote:
> 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.
>
Please send a tested, changelogged patch to fix it. Be sure to cc the
relevant maintainer and mailing list.
Thanks.
next prev parent reply other threads:[~2011-05-12 1:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 16:25 Bug in MTD NAND ONFI chipsize detection Nitin Garg
2011-05-12 1:33 ` Andrew Morton [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110511183322.da0739c9.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=nitingarg98@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox