From: Matthieu CASTET <matthieu.castet@parrot.com>
To: Nitin Garg <nitingarg98@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Bug in MTD NAND ONFI chipsize detection
Date: Thu, 12 May 2011 17:39:55 +0200 [thread overview]
Message-ID: <4DCBFF4B.9030609@parrot.com> (raw)
In-Reply-To: <BANLkTik37R8tSxc9_qmBT5a2m9mAA_2XKQ@mail.gmail.com>
Nitin Garg a écrit :
> I do not see any diff for mtd.
>
ONFI spec say [1].
Why this doesn't apply to mtd ?
[1]
3.1.2. Logical Unit Selection
Logical units within one target share a single data bus with the host. The host
shall ensure that
only one LUN is selected for data output to the host at any particular point in
time to avoid bus
contention.
The host selects a LUN for future data output by issuing a Read Status Enhanced
command to
that LUN. The Read Status Enhanced command shall deselect the output path for
all LUNs that
are not addressed by the command. The page register selected for output within
the LUN is
determined by the previous Read (Cache) commands issued, and is not impacted by Read
Status Enhanced.
> Regards,
> Nitin
>
> On Thu, May 12, 2011 at 2:47 AM, Matthieu CASTET
> <matthieu.castet@parrot.com> wrote:
>> Hi,
>>
>>
>> What's the difference between one lun and multiple lun for mtd ?
>>
>> Aren't any command to select the current lun ?
>>
>> Matthieu
>>
>>
>> Nitin Garg a écrit :
>>> Why isn't my patch going through? re-sending again,
>>>
>>> Signed-off-by: Nitin Garg <nitingarg98@xxxxxxxx>
>>> ---
>>> drivers/mtd/nand/nand_base.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>>> index c54a4cb..cdf6015 100644
>>> --- a/drivers/mtd/nand/nand_base.c
>>> +++ b/drivers/mtd/nand/nand_base.c
>>> @@ -2892,7 +2892,7 @@ static int nand_flash_detect_onfi(struct
>>> mtd_info *mtd, struct nand_chip *chip,
>>> mtd->writesize = le32_to_cpu(p->byte_per_page);
>>> mtd->erasesize = le32_to_cpu(p->pages_per_block) * mtd->writesize;
>>> mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page);
>>> - chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) * mtd->erasesize;
>>> + chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) *
>>> le32_to_cpu(p->lun_count) * mtd->erasesize;
>>> busw = 0;
>>> if (le16_to_cpu(p->features) & 1)
>>> busw = NAND_BUSWIDTH_16;
>
prev parent reply other threads:[~2011-05-12 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BANLkTi=e1mUTX4X7ui+HVCGh=sZ=HLoNCw@mail.gmail.com>
2011-05-12 1:33 ` Bug in MTD NAND ONFI chipsize detection 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 message]
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=4DCBFF4B.9030609@parrot.com \
--to=matthieu.castet@parrot.com \
--cc=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;
as well as URLs for NNTP newsgroup(s).