From: Peter Korsgaard <jacmet@sunsite.dk>
To: Tobias Simon <tobias.simon@sp-ss.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mtd_dataflash bug
Date: Wed, 13 May 2009 14:12:58 +0200 [thread overview]
Message-ID: <87iqk5ryk5.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <4A0A1F38.6000500@sp-ss.de> (Tobias Simon's message of "Wed\, 13 May 2009 03\:15\:36 +0200")
>>>>> "Tobias" == Tobias Simon <tobias.simon@sp-ss.de> writes:
Tobias> Hello List,
Tobias> i have figured out a bug in mtd_datflash.c of kernel 2.6.29, which
Tobias> causes my ARM bootloader to be killed with every "erase" operation on
Tobias> arbitrary adresses. The fix is:
Ahh yes, I just sent a patch for the same thing a bit earlier.
This (or my patch) should go to 2.6.29-stable as well.
Tobias> --- linux-2.6.29.2-a/drivers/mtd/devices/mtd_dataflash.c 2009-05-13
Tobias> 03:11:16.000000000 +0200
Tobias> +++ linux-2.6.29.2-b/drivers/mtd/devices/mtd_dataflash.c
Tobias> 2009-05-13 03:13:30.000000000 +0200
Tobias> @@ -184,7 +184,7 @@
Tobias> /* Calculate flash page address; use block erase (for
Tobias> speed) if
Tobias> * we're at a block boundary and need to erase the
Tobias> whole block.
Tobias> */
Tobias> - pageaddr = div_u64(instr->len, priv->page_size);
Tobias> + pageaddr = div_u64(instr->addr, priv->page_size);
Tobias> do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
Tobias> pageaddr = pageaddr << priv->page_offset;
--
Bye, Peter Korsgaard
prev parent reply other threads:[~2009-05-13 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 1:15 mtd_dataflash bug Tobias Simon
2009-05-13 12:12 ` Peter Korsgaard [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=87iqk5ryk5.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=linux-mtd@lists.infradead.org \
--cc=tobias.simon@sp-ss.de \
/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.