public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Christopher Moore <moore@free.fr>
To: linux-mtd@lists.infradead.org
Subject: Re: uniform flash using cmdset_0002
Date: Mon, 22 Sep 2008 22:08:11 +0000 (UTC)	[thread overview]
Message-ID: <loom.20080922T213423-993@post.gmane.org> (raw)
In-Reply-To: 20080709071615.GA15212@digi.com

Uwe Kleine-König <Uwe.Kleine-Koenig <at> digi.com> writes:

[snip]
> 	physmap-flash.0: CFI does not contain boot bank location. Assuming top.
> 
> The last message comes from the following code in
> cfi_cmdset_0002() (drivers/mtd/chips/cfi_cmdset_0002.c):
> 
> 	bootloc = extp->TopBottom;
> 	if ((bootloc != 2) && (bootloc != 3)) {
> 		printk(KERN_WARNING "%s: CFI does not contain boot "
> 		       "bank location. Assuming top.\n", map->name);
> 		bootloc = 2;
> 	}
> 
> For that chip extp->TopBottom is 5.
> 
> I wonder what is intended here.  The only other usage of bootloc (which
> is a local variable for cfi_cmdset_0002()) is
> 
> 	if (bootloc == 3 && something_else) {
> 		...
> 
> So if ((bootloc != 2) && (bootloc != 3)) setting bootloc = 2 doesn't
> change anything!?
> 
> If I didn't oversee something I suggest to delete the if containing the
> warning.
> 

Full ACK.

Nice catch, Uwe.

The worst thing is that it says "Assuming top" but sets bootloc to
bottom (2) :(

I figure that:
- this code was intended for early chips with an AMD/Fujitsu V1.0 CFI PRI
which does not contain TopBottom (such AMD chips are now handled in
fixup_amd_bootblock()),
- an earlier version of this code must have set bootloc to top (3) which
would have had some effect.

However the effect would possibly be undesirable in cases such as yours :(

I see you sent a patch to linux-mtd but it seems to have been completely
ignored :(

Do you know where I can find your patch in a form where I can reply to it?
If so I shall add my ACK (FWIW) and ping it.

Cheers,
Chris

      reply	other threads:[~2008-09-22 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09  7:16 uniform flash using cmdset_0002 Uwe Kleine-König
2008-09-22 22:08 ` Christopher Moore [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=loom.20080922T213423-993@post.gmane.org \
    --to=moore@free.fr \
    --cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox