From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Peter Korsgaard <jacmet@sunsite.dk>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"David.Woodhouse@intel.com" <David.Woodhouse@intel.com>,
"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH] mtd_dataflash: unbreak erase support
Date: Wed, 13 May 2009 15:16:36 +0300 [thread overview]
Message-ID: <4A0ABA24.7080801@nokia.com> (raw)
In-Reply-To: <1242216722-7262-1-git-send-email-jacmet@sunsite.dk>
ext Peter Korsgaard wrote:
> Commit 5b7f3a50 (fix dataflash 64-bit divisions) unfortunately
> introduced a typo. Erase addr and len were swapped in the pageaddr
> calculation, causing the wrong sectors to get erased.
>
> Please consider for 2.6.29-stable as well.
>
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> ---
> drivers/mtd/devices/mtd_dataflash.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
> index 62dee54..43976aa 100644
> --- a/drivers/mtd/devices/mtd_dataflash.c
> +++ b/drivers/mtd/devices/mtd_dataflash.c
> @@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
> /* Calculate flash page address; use block erase (for speed) if
> * we're at a block boundary and need to erase the whole block.
> */
> - pageaddr = div_u64(instr->len, priv->page_size);
> + pageaddr = div_u64(instr->addr, priv->page_size);
> do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
> pageaddr = pageaddr << priv->page_offset;
Oh, sorry for that.
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-05-13 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 12:12 [PATCH] mtd_dataflash: unbreak erase support Peter Korsgaard
2009-05-13 12:16 ` Artem Bityutskiy [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-05-18 10:07 Peter Korsgaard
2009-05-18 10:13 David Woodhouse
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=4A0ABA24.7080801@nokia.com \
--to=artem.bityutskiy@nokia.com \
--cc=David.Woodhouse@intel.com \
--cc=jacmet@sunsite.dk \
--cc=linux-mtd@lists.infradead.org \
--cc=stable@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.