linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: <dedekind1@gmail.com>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org
Subject: Re: [PATCH] ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1
Date: Mon, 28 Oct 2013 10:57:33 +0800	[thread overview]
Message-ID: <526DD29D.2070407@freescale.com> (raw)
In-Reply-To: <1382780870.5901.20.camel@karhu.quadriga.com>

于 2013年10月26日 17:47, Artem Bityutskiy 写道:
> What is 'numeraseregions == 1'? How is it different to 'numeraseregions
> == 0'?
>
> Is the "main" area covered by mtd->size, or 'mtd->size' spans the entire
> chip and includes all the regions?
>
i think the mtd->size spans the entire chip and include the all the regions.


> What is the flash you are dealing with? Surely this is not gpmi-nand?
I meet this bug with a Micron's Parallel Nor: M29W256GL
it is not used by the gpmi-nand, it's used by weim driver: 
drivers/bus/imx-weim.c

this NOR's Number of erase block regions is 1, i quote the test here, 
see page 50
(i will send you the datasheet in a private email):

"
   It specifes the number of regions containning contiguous erase blocks 
of the same size.

"

please see allocate_partition():

   
---------------------------------------------------------------------------------
   if (master->numeraseregions > 1) {
       ................
   } else {
       /* Single erase size */
   }

   
---------------------------------------------------------------------------------

this NOR is 32MB, its master partion has 1 for "numeraseregions". if we 
add a 32MB slave partition
  to this NOR, the slave partition does NOT inherit the numeraseregions 
of the master partition.
So the ubiattach will succeed with the slave partition.

But if we attach the master partition directly, we will fails.

thanks
Huang Shijie

  reply	other threads:[~2013-10-28  2:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18  2:17 [PATCH] ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1 Huang Shijie
2013-10-09  9:00 ` Huang Shijie
2013-10-26  9:47 ` Artem Bityutskiy
2013-10-28  2:57   ` Huang Shijie [this message]
2013-11-05  6:12 ` Huang Shijie

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=526DD29D.2070407@freescale.com \
    --to=b32955@freescale.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).