From: Thayne Harbaugh <tharbaugh@lnxi.com>
To: ch@hpl.hp.com
Cc: ch@murgatroid.com
Cc: 'mtd list' <linux-mtd@lists.infradead.org>
Subject: RE: Regression of mtd/chips/jedec_probe.c in 2.6.0-test7
Date: 22 Oct 2003 16:51:08 -0600 [thread overview]
Message-ID: <1066863067.6281.197.camel@tubarao> (raw)
In-Reply-To: <000001c398ec$81bc7020$d203b60f@duckduck>
[-- Attachment #1: Type: text/plain, Size: 2594 bytes --]
On Wed, 2003-10-22 at 16:33, Christopher Hoover wrote:
> > If you can narrow the problem down to just a few lines that
> > are obviously incorrect then the patch should have a fighting
> > chance.
>
> Here's what I tried:
>
> --- linux-2.6.0-test8-rmk1/drivers/mtd/chips/jedec_probe.c 2003-10-20
> 22:19:24.000000000 -0700
> +++ linux-2.6.0-test8-rmk1-ceiva1/drivers/mtd/chips/jedec_probe.c
> 2003-10-22 15:24:55.000000000 -0700
> @@ -1481,7 +1481,7 @@
> DEBUG( MTD_DEBUG_LEVEL3,
> "MTD %s(): Check fit 0x%.8x + 0x%.8x = 0x%.8x\n",
> __func__, base, 1 << finfo->DevSize, base + (1 <<
> finfo->DevSize) );
> - if ( base + ( 1 << finfo->DevSize ) > map->size ) {
> + if ( base + cfi->interleave * ( 1 << finfo->DevSize ) > map->size )
> {
> DEBUG( MTD_DEBUG_LEVEL3,
> "MTD %s(): 0x%.4x 0x%.4x %dKiB doesn't fit\n",
> __func__, finfo->mfr_id, finfo->dev_id,
This is needed.
> @@ -1539,10 +1539,10 @@
> */
> DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): return to ID mode\n", __func__
> );
> if(cfi->addr_unlock1) {
> - cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi,
> CFI_DEVICETYPE_X8, NULL);
> - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi,
> CFI_DEVICETYPE_X8, NULL);
> + cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi,
> cfi->device_type, NULL);
> + cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi,
> cfi->device_type, NULL);
> }
> - cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi,
> CFI_DEVICETYPE_X8, NULL);
> + cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi,
> cfi->device_type, NULL);
> /* FIXME - should have a delay before continuing */
>
> match_done:
There's one more fragment where cfi->device_type should revert back to
CFI_DEVICETYPE_X8
@@ -1674,10 +1674,10 @@
/* Autoselect Mode */
if(cfi->addr_unlock1) {
- cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi,
cfi->device_type, NULL);
- cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi,
cfi->device_type, NULL);
+ cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi,
CFI_DEVICETYPE_X8, NULL);
+ cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi,
CFI_DEVICETYPE_X8, NULL);
}
- cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi,
cfi->device_type, NULL);
+ cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi,
CFI_DEVICETYPE_X8, NULL);
/* FIXME - should have a delay before continuing */
if (!cfi->numchips) {
Let me know if this fixes it.
--
Thayne Harbaugh
Linux Networx
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-10-22 22:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 23:46 Regression of mtd/chips/jedec_probe.c in 2.6.0-test7 Christopher Hoover
2003-10-16 14:08 ` Thayne Harbaugh
2003-10-22 22:33 ` Christopher Hoover
2003-10-22 22:51 ` Thayne Harbaugh [this message]
2003-10-23 0:43 ` Christopher Hoover
2003-10-23 15:56 ` Thayne Harbaugh
2003-10-23 16:13 ` Thayne Harbaugh
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=1066863067.6281.197.camel@tubarao \
--to=tharbaugh@lnxi.com \
--cc=ch@hpl.hp.com \
--cc=ch@murgatroid.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