Artem,
Here are the 2 patches you requested in place of
[PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter
I made some changes to correct some things that Shmulik pointed out:
* max_beb_per1024 is now an unsigned.
* ubi_mtd_param_parse can fail on kstrtouint error.
Richard
a kernel parameter, now we can also use
UBI_IOCATT ioctl:
struct ubi_attach_req {
__s32 ubi_num;
__s32 mtd_num;
__s32 vid_hdr_offset;
__u8 max_beb_per1024;
__s8 padding[11];
};
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
drivers/mtd/ubi/cdev.c
|num|path[,vid_hdr_offs[,max_beb_per1024]]
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
arch/arm/configs/sam9_l9260_defconfig |1 -
drivers/mtd/ubi/Kconfig | 26 -
drivers/mtd/ubi/build.c | 93 ++---
drivers/mtd
-by: Richard Genoud richard.gen...@gmail.com
---
arch/arm/configs/sam9_l9260_defconfig |1 +
drivers/mtd/ubi/Kconfig | 29 +
drivers/mtd/ubi/ubi.h |2 +-
3 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/arch/arm
-by: Richard Genoud
---
drivers/pinctrl/core.c | 10 ++
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index fb7f3be..7365d46 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -657,11 +657,7 @@ static struct
As struct device is used as a function argument, it should at least be
declared (device.h is not included).
Signed-off-by: Richard Genoud
---
include/linux/pinctrl/consumer.h |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/pinctrl/consumer.h b/include
As struct device is used as a function argument, it should at least be
declared (device.h is not included).
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
include/linux/pinctrl/consumer.h |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/pinctrl
-by: Richard Genoud richard.gen...@gmail.com
---
drivers/pinctrl/core.c | 10 ++
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index fb7f3be..7365d46 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -657,11
2012/7/18 Artem Bityutskiy :
> On Tue, 2012-07-10 at 18:23 +0200, Richard Genoud wrote:
>>
>> The Kconfig option is in per1024 blocks, thus it can have a default
>> value of 20 which is *very* common for NAND devices.
>
> Why do you prefer per1024? I'd make it cent
2012/7/18 Artem Bityutskiy dedeki...@gmail.com:
On Tue, 2012-07-10 at 18:23 +0200, Richard Genoud wrote:
The Kconfig option is in per1024 blocks, thus it can have a default
value of 20 which is *very* common for NAND devices.
Why do you prefer per1024? I'd make it centi-percent instead
struct mtd_info is not modified by mtd_is_partition so it should be a
const.
Signed-off-by: Richard Genoud
---
drivers/mtd/mtdpart.c |2 +-
include/linux/mtd/partitions.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd
ave a default
value of 20 which is *very* common for NAND devices.
Signed-off-by: Richard Genoud
---
drivers/mtd/ubi/Kconfig | 14 ++
drivers/mtd/ubi/build.c | 17 ++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/
r:
ubi.mtd=[,[,max_beb_per1024]]
and via UBI_IOCATT ioctl which is now:
struct ubi_attach_req {
__s32 ubi_num;
__s32 mtd_num;
__s32 vid_hdr_offset;
__u8 max_beb_per1024;
__s8 padding[11];
};
Signed-off-by: Richard Genoud
---
drivers/mtd/ubi/Kcon
appear
every where on a flash device, in the worst case scenario they can
all appear in one MTD partition.
So the maximum number of expected erase blocks given by the NAND
manufacturer should be reserve on each MTD partition.
Signed-off-by: Richard Genoud
---
include/mtd/ubi-user.h
mtd_get_device_size() returns the size of the whole MTD device, that is
the mtd_info master size.
This is used by UBI to calculate the maximum number of bad blocks (MBB)
on a MTD device.
Signed-off-by: Richard Genoud
---
drivers/mtd/mtdpart.c | 14 ++
include/linux/mtd
hen, patch 4 replace this option with user-space parameters (kernel parameter
and a UBI_IOCATT ioctl)
The patch on mtd-utils follows the serie.
Richard Genoud (4):
mtd_is_partition: struct mtd_info should be const
MTD parts: introduce mtd_get_device_size()
UBI: use the whole MTD device s
replace this option with user-space parameters (kernel parameter
and a UBI_IOCATT ioctl)
The patch on mtd-utils follows the serie.
Richard Genoud (4):
mtd_is_partition: struct mtd_info should be const
MTD parts: introduce mtd_get_device_size()
UBI: use the whole MTD device size to get
mtd_get_device_size() returns the size of the whole MTD device, that is
the mtd_info master size.
This is used by UBI to calculate the maximum number of bad blocks (MBB)
on a MTD device.
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
drivers/mtd/mtdpart.c | 14
on a flash device, in the worst case scenario they can
all appear in one MTD partition.
So the maximum number of expected erase blocks given by the NAND
manufacturer should be reserve on each MTD partition.
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
include/mtd/ubi-user.h
|num|path[,vid_hdr_offs[,max_beb_per1024]]
and via UBI_IOCATT ioctl which is now:
struct ubi_attach_req {
__s32 ubi_num;
__s32 mtd_num;
__s32 vid_hdr_offset;
__u8 max_beb_per1024;
__s8 padding[11];
};
Signed-off-by: Richard Genoud richard.gen...@gmail.com
a default
value of 20 which is *very* common for NAND devices.
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
drivers/mtd/ubi/Kconfig | 14 ++
drivers/mtd/ubi/build.c | 17 ++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/ubi
struct mtd_info is not modified by mtd_is_partition so it should be a
const.
Signed-off-by: Richard Genoud richard.gen...@gmail.com
---
drivers/mtd/mtdpart.c |2 +-
include/linux/mtd/partitions.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd
2012/7/4 Shmulik Ladkani :
> diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
> index f6a7d7a..e9dcb83 100644
> --- a/drivers/mtd/ubi/misc.c
> +++ b/drivers/mtd/ubi/misc.c
> @@ -98,10 +98,18 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id)
> */
> void
2012/7/7 Shmulik Ladkani :
> Many thanks for testing.
>
> Could you please verify the crash only occurs with the patch?
>
> Can you provide the vmlinux matching this oops, so I may analyze the
> exact null dereferencing point?
> It seems to be somewhere in ubi_wl_init, however the patch seems not
2012/7/7 Shmulik Ladkani shmulik.ladk...@gmail.com:
Many thanks for testing.
Could you please verify the crash only occurs with the patch?
Can you provide the vmlinux matching this oops, so I may analyze the
exact null dereferencing point?
It seems to be somewhere in ubi_wl_init, however
2012/7/4 Shmulik Ladkani shmulik.ladk...@gmail.com:
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index f6a7d7a..e9dcb83 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -98,10 +98,18 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id)
*/
void
2012/7/7 Shmulik Ladkani :
> Many thanks for testing.
>
> Could you please verify the crash only occurs with the patch?
>
> Can you provide the vmlinux matching this oops, so I may analyze the
> exact null dereferencing point?
> It seems to be somewhere in ubi_wl_init, however the patch seems not
2012/7/7 Shmulik Ladkani shmulik.ladk...@gmail.com:
Many thanks for testing.
Could you please verify the crash only occurs with the patch?
Can you provide the vmlinux matching this oops, so I may analyze the
exact null dereferencing point?
It seems to be somewhere in ubi_wl_init, however
I've got an oops...
this is my dev-kernel in 3.5-rc5 + some work to be able to boot on my board
NB: If I use ubi_format it's ok.
the mtd1 device has 1984 PEB
the 4 last are UBI reserved + BBT
I didn't test without your patch, but anyway something is wrong there.
# flash_erase /dev/mtd1 0 1980
I've got an oops...
this is my dev-kernel in 3.5-rc5 + some work to be able to boot on my board
NB: If I use ubi_format it's ok.
the mtd1 device has 1984 PEB
the 4 last are UBI reserved + BBT
I didn't test without your patch, but anyway something is wrong there.
# flash_erase /dev/mtd1 0 1980
801 - 830 of 830 matches
Mail list logo