[PATCH resend] ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1

Huang Shijie b32955 at freescale.com
Wed Feb 19 06:40:41 EST 2014


On Fri, Feb 14, 2014 at 01:22:54PM +0200, Artem Bityutskiy wrote:
> On Fri, 2014-02-14 at 17:11 +0800, Huang Shijie wrote:
> > But if we do not have any _slave_ partitions, we will only have one
> > master partition.
> > and the numeraseregions is kept. this is the case i meet.
> 
> Why you prefer to change UBI instead of changing MTD so that master
> partitions with no slave partitions would have numeraseregions=0.

the master partition's numeraseregions is get from the code, such as
cfi_amdstd_setup. In other word, the numeraseregions is get from the
probe.

i do not think change the MTD is a good idea.

> 
> And frankly, I did not clearly understand your answer.
sorry.

> 
> And what erase regions have to do with master/slave?
> 
> Correct me if I am wrong below.
> 
> The erase region concept belongs to the flash chip. Some chips have
> special regions, for some special purposes, and these, typically small,
> regions have a bit different geometry.
agree.

> 
> Master/slave is a purely software concept. I never clearly understood
> the model, but this is something related to partitions. We have a master
> MTD device representing the entire chip, and slave MTD devices
> representing partitions.
The slave is purely software concept.

But the master has some information from the chip, as you said, such as
the numeraseregions, the size of the flash.


thanks
Huang Shijie





More information about the linux-mtd mailing list