From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Enric Balletbò i Serra" <eballetbo@gmail.com>
Cc: kyungmin.park@samsung.com, linux-omap@vger.kernel.org,
linux-mtd@lists.infradead.org,
"Hunter Adrian \(Nokia-D/Helsinki\)" <adrian.hunter@nokia.com>
Subject: Re: Possible bug in onenand_base ?
Date: Wed, 05 May 2010 08:56:19 +0300 [thread overview]
Message-ID: <1273038979.3702.57.camel@localhost> (raw)
In-Reply-To: <u2v70c9a9111004300305n4c86774bm7ed70161ad72d830@mail.gmail.com>
Probably Adrian could comment on this?
On Fri, 2010-04-30 at 12:05 +0200, Enric Balletbò i Serra wrote:
> Hello all,
>
> After commit 5988af2319781bc8e0ce418affec4e09cfa77907 (mtd:
> Flex-OneNAND support) the onenand support for my device is broken.
>
> Before this commit when I run the nandtest program all is ok
> ---
> # nandtest /dev/mtd3
> ECC corrections: 0
> ECC failures : 0
> Bad blocks : 0
> BBT blocks : 0
> 002c0000: checking...
> Finished pass 1 successfully
> --
>
> Introduced commit 5988af2319781bc8e0ce418affec4e09cfa7790 the nandtest
> fails with:
> ---
> # nandtest /dev/mtd3
> ECC corrections: 0
> ECC failures : 0
> Bad blocks : 0
> BBT blocks : 0
> 00000000: reading...
> [ 299.092041] onenand_wait: ECC error = 0x8488
> ( ... lots of ECC errors ... )
> [ 299.092041] onenand_wait: ECC error = 0x8488
> ECC failed at 00000000
> 00000000: checking...
> compare failed. seed 1804289383
> Byte 0x1 is 5a should be da
> Byte 0x3 is 82 should be 92
> Byte 0x4 is 10 should be 1a
> ( ... )
> ---
>
> Investigating a little I see a significant difference introduced by
> this patch. In line
>
> 347: page = (int) (addr - onenand_addr(this, block)) >>
> this->page_shift; (patch applied)
>
> instead of
>
> 347: page = (int) (addr >> this->page_shift); (without patch)
>
> I applied commit 5988af2319781bc8e0ce418affec4e09cfa7790 and replaced
> the line 347 and now works again. Fantastic, but I suspect this is not
> the proper solution (probably this breaks other onenands devices, I
> can't test).
>
> I'm just introducing in OneNAND devices so anyone can help me to
> understand and solve the problem ? Note that my device is a Numonyx
> 4-Gbit DDP (DUAL DIE PLAN) OneNAND flash memory ( 2 dice of 2Gb, 2KB
> page )
>
> Thanks in advance,
>
> ///:~Enric
>
> ---
> diff --git a/drivers/mtd/onenand/onenand_base.c
> b/drivers/mtd/onenand/onenand_base.c
> index 081f97d..b1d50a3 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -344,7 +344,7 @@ static int onenand_command(struct mtd_info *mtd,
> int cmd, loff_t addr, size_t le
>
> default:
> block = (int) onenand_block(this, addr);
> - page = (int) (addr - onenand_addr(this, block)) >> this->page_shift;
> + page = (int) (addr >> this->page_shift);
>
> if (ONENAND_IS_2PLANE(this)) {
> /* Make the even block number */
> ---
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Enric Balletbò i Serra" <eballetbo@gmail.com>
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
kyungmin.park@samsung.com,
"Hunter Adrian (Nokia-D/Helsinki)" <adrian.hunter@nokia.com>
Subject: Re: Possible bug in onenand_base ?
Date: Wed, 05 May 2010 08:56:19 +0300 [thread overview]
Message-ID: <1273038979.3702.57.camel@localhost> (raw)
In-Reply-To: <u2v70c9a9111004300305n4c86774bm7ed70161ad72d830@mail.gmail.com>
Probably Adrian could comment on this?
On Fri, 2010-04-30 at 12:05 +0200, Enric Balletbò i Serra wrote:
> Hello all,
>
> After commit 5988af2319781bc8e0ce418affec4e09cfa77907 (mtd:
> Flex-OneNAND support) the onenand support for my device is broken.
>
> Before this commit when I run the nandtest program all is ok
> ---
> # nandtest /dev/mtd3
> ECC corrections: 0
> ECC failures : 0
> Bad blocks : 0
> BBT blocks : 0
> 002c0000: checking...
> Finished pass 1 successfully
> --
>
> Introduced commit 5988af2319781bc8e0ce418affec4e09cfa7790 the nandtest
> fails with:
> ---
> # nandtest /dev/mtd3
> ECC corrections: 0
> ECC failures : 0
> Bad blocks : 0
> BBT blocks : 0
> 00000000: reading...
> [ 299.092041] onenand_wait: ECC error = 0x8488
> ( ... lots of ECC errors ... )
> [ 299.092041] onenand_wait: ECC error = 0x8488
> ECC failed at 00000000
> 00000000: checking...
> compare failed. seed 1804289383
> Byte 0x1 is 5a should be da
> Byte 0x3 is 82 should be 92
> Byte 0x4 is 10 should be 1a
> ( ... )
> ---
>
> Investigating a little I see a significant difference introduced by
> this patch. In line
>
> 347: page = (int) (addr - onenand_addr(this, block)) >>
> this->page_shift; (patch applied)
>
> instead of
>
> 347: page = (int) (addr >> this->page_shift); (without patch)
>
> I applied commit 5988af2319781bc8e0ce418affec4e09cfa7790 and replaced
> the line 347 and now works again. Fantastic, but I suspect this is not
> the proper solution (probably this breaks other onenands devices, I
> can't test).
>
> I'm just introducing in OneNAND devices so anyone can help me to
> understand and solve the problem ? Note that my device is a Numonyx
> 4-Gbit DDP (DUAL DIE PLAN) OneNAND flash memory ( 2 dice of 2Gb, 2KB
> page )
>
> Thanks in advance,
>
> ///:~Enric
>
> ---
> diff --git a/drivers/mtd/onenand/onenand_base.c
> b/drivers/mtd/onenand/onenand_base.c
> index 081f97d..b1d50a3 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -344,7 +344,7 @@ static int onenand_command(struct mtd_info *mtd,
> int cmd, loff_t addr, size_t le
>
> default:
> block = (int) onenand_block(this, addr);
> - page = (int) (addr - onenand_addr(this, block)) >> this->page_shift;
> + page = (int) (addr >> this->page_shift);
>
> if (ONENAND_IS_2PLANE(this)) {
> /* Make the even block number */
> ---
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-05 6:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-30 10:05 Possible bug in onenand_base ? Enric Balletbò i Serra
2010-04-30 10:05 ` Enric Balletbò i Serra
2010-05-05 5:56 ` Artem Bityutskiy [this message]
2010-05-05 5:56 ` Artem Bityutskiy
2010-05-06 3:46 ` Kyungmin Park
2010-05-06 3:46 ` Kyungmin Park
2010-05-06 11:22 ` Enric Balletbò i Serra
2010-05-06 11:22 ` Enric Balletbò i Serra
2010-05-06 11:44 ` Kyungmin Park
2010-05-06 11:44 ` Kyungmin Park
2010-05-06 13:02 ` Enric Balletbò i Serra
2010-05-06 13:02 ` Enric Balletbò i Serra
2010-05-12 10:29 ` Enric Balletbò i Serra
2010-05-12 10:29 ` Enric Balletbò i Serra
2010-05-12 13:16 ` Enric Balletbò i Serra
2010-05-12 13:16 ` Enric Balletbò i Serra
2010-07-08 9:55 ` Enric Balletbò i Serra
2010-07-08 9:55 ` Enric Balletbò i Serra
2010-07-08 9:58 ` Artem Bityutskiy
2010-07-08 9:58 ` Artem Bityutskiy
2010-07-08 10:11 ` Enric Balletbò i Serra
2010-07-08 10:11 ` Enric Balletbò i Serra
2010-07-08 10:22 ` Artem Bityutskiy
2010-07-08 10:22 ` Artem Bityutskiy
2010-07-12 14:59 ` Enric Balletbò i Serra
2010-07-12 14:59 ` Enric Balletbò i Serra
-- strict thread matches above, loose matches on Subject: below --
2010-07-14 8:52 ROHIT H.S
2010-07-14 14:37 ` Enric Balletbò i Serra
2010-07-15 9:25 ` Rohit Hassan Sathyanarayan
2010-07-15 11:19 ` Enric Balletbò i Serra
2010-07-16 12:04 ` Rohit Hassan Sathyanarayan
2010-07-18 16:47 ` Artem Bityutskiy
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=1273038979.3702.57.camel@localhost \
--to=dedekind1@gmail.com \
--cc=adrian.hunter@nokia.com \
--cc=eballetbo@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.