Re: [RESEND PATCH 1/6] acpi: Remove the leading space of "unlock" label in acpi_memory_device_notify().

2013-03-26 Thread Richard Genoud
2013/3/26 Rafael J. Wysocki : > On Wednesday, March 06, 2013 04:30:06 PM Tang Chen wrote: >> There is a leading space in front of "unlock" label in >> acpi_memory_device_notify(). Remove it. >> >> Signed-off-by: Tang Chen >> --- >> drivers/acpi/acpi_memhotplug.c |2 +- >> 1 files changed, 1

Re: [RESEND PATCH 1/6] acpi: Remove the leading space of unlock label in acpi_memory_device_notify().

2013-03-26 Thread Richard Genoud
2013/3/26 Rafael J. Wysocki r...@sisk.pl: On Wednesday, March 06, 2013 04:30:06 PM Tang Chen wrote: There is a leading space in front of unlock label in acpi_memory_device_notify(). Remove it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/acpi_memhotplug.c |2 +-

[PATCH 2/4] pinctrl: create pinctrl_free_setting function

2013-03-25 Thread Richard Genoud
This prepares the implementation of pinctrl_select_state_locked() free code. No functionnal change. Signed-off-by: Richard Genoud --- drivers/pinctrl/core.c | 32 +++- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/core.c b

[PATCH 4/4] pinctrl: re-enable old state in case of error in pinctrl_select_state

2013-03-25 Thread Richard Genoud
If a new state is applied, the groups configured in the old state but not in the new state are disabled. If something goes wrong and the new state can't be applied, we have to re-enable those groups. Signed-off-by: Richard Genoud --- drivers/pinctrl/core.c | 20 +++- 1 files

[PATCH 3/4] pinctrl: disable and free setting in select_state in case of error

2013-03-25 Thread Richard Genoud
If enabling a pin fails in pinctrl_select_state_locked(), all the previous enabled pins have to be disabled to get back to the previous state. Signed-off-by: Richard Genoud --- drivers/pinctrl/core.c | 28 +--- 1 files changed, 25 insertions(+), 3 deletions(-) diff

[PATCH 1/4] pinctrl: fix typo in header

2013-03-25 Thread Richard Genoud
Clearly, "node" was meant instead of "not" Signed-off-by: Richard Genoud --- drivers/pinctrl/core.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index ee72f1f..6d3d400 100644 --- a/drivers/pinctrl/

[PATCH 0/4] pintrcl: restore old state when pinctrl_select_state fails

2013-03-25 Thread Richard Genoud
patch undoes what have been done to enable the new state. The last patch re-applies the old state. Richard Genoud (4): pinctrl: fix typo in header pinctrl: create pinctrl_free_setting function pinctrl: disable and free setting in select_state in case of error pinctrl: re-enable old state

[PATCH 0/4] pintrcl: restore old state when pinctrl_select_state fails

2013-03-25 Thread Richard Genoud
patch undoes what have been done to enable the new state. The last patch re-applies the old state. Richard Genoud (4): pinctrl: fix typo in header pinctrl: create pinctrl_free_setting function pinctrl: disable and free setting in select_state in case of error pinctrl: re-enable old state

[PATCH 1/4] pinctrl: fix typo in header

2013-03-25 Thread Richard Genoud
Clearly, node was meant instead of not Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/core.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index ee72f1f..6d3d400 100644 --- a/drivers/pinctrl

[PATCH 3/4] pinctrl: disable and free setting in select_state in case of error

2013-03-25 Thread Richard Genoud
If enabling a pin fails in pinctrl_select_state_locked(), all the previous enabled pins have to be disabled to get back to the previous state. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/core.c | 28 +--- 1 files changed, 25 insertions

[PATCH 4/4] pinctrl: re-enable old state in case of error in pinctrl_select_state

2013-03-25 Thread Richard Genoud
If a new state is applied, the groups configured in the old state but not in the new state are disabled. If something goes wrong and the new state can't be applied, we have to re-enable those groups. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/core.c | 20

[PATCH 2/4] pinctrl: create pinctrl_free_setting function

2013-03-25 Thread Richard Genoud
This prepares the implementation of pinctrl_select_state_locked() free code. No functionnal change. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/core.c | 32 +++- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers

Re: [PATCH] BUG: [RFC] pinctrl: pins are freed 2 times in pinctrl_bind_pins

2013-03-21 Thread Richard Genoud
2013/3/20 Stephen Warren : > On 03/20/2013 05:31 AM, Richard Genoud wrote: >> If the function pinctrl_select_state() fails because one pin is already >> taken elsewhere, pinmux_enable_setting makes all the necessary pin_free >> calls (and not more than necessary)

[PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-21 Thread Richard Genoud
If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will issue a warning, so that we can correct the code responsible for the double free. Signed-off-by: Richard Genoud --- Ok Stephen, your idea (and code) seems better. I signed-off

[PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-21 Thread Richard Genoud
If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will issue a warning, so that we can correct the code responsible for the double free. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- Ok Stephen, your idea (and code) seems

Re: [PATCH] BUG: [RFC] pinctrl: pins are freed 2 times in pinctrl_bind_pins

2013-03-21 Thread Richard Genoud
2013/3/20 Stephen Warren swar...@wwwdotorg.org: On 03/20/2013 05:31 AM, Richard Genoud wrote: If the function pinctrl_select_state() fails because one pin is already taken elsewhere, pinmux_enable_setting makes all the necessary pin_free calls (and not more than necessary). The problem here

Re: [PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-20 Thread Richard Genoud
2013/3/20 Stephen Warren : > On 03/20/2013 05:31 AM, Richard Genoud wrote: >> If pin_free is called on a pin already freed, mux_usecount is set to >> UINT_MAX which is really a bad idea. >> This will silently ignore a double call to pin_free > > Shouldn't we WARN_ON(thi

Re: [PATCH] BUG: pinmux: release only taken pins on error

2013-03-20 Thread Richard Genoud
2013/3/20 Axel Lin : > 2013/3/20 Richard Genoud : >> commit e38d457de7be63e6ced1ea254aa51466deb1fef0 >> pinctrl: pinmux: Release all taken pins in pinmux_enable_setting >> >> Introduced a bug in the release pin mechanism. >> All the pins (taken or not) where re

[PATCH] BUG: [RFC] pinctrl: pins are freed 2 times in pinctrl_bind_pins

2013-03-20 Thread Richard Genoud
thing to do. Signed-off-by: Richard Genoud --- drivers/base/pinctrl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/base/pinctrl.c b/drivers/base/pinctrl.c index 67a274e..537406d 100644 --- a/drivers/base/pinctrl.c +++ b/drivers/base/pinctrl.c @@ -45,7 +45,7

[PATCH] BUG: pinmux: release only taken pins on error

2013-03-20 Thread Richard Genoud
-by: Richard Genoud --- drivers/pinctrl/pinmux.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 1a00658..917e830 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -409,6 +409,8 @@ int

[PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-20 Thread Richard Genoud
If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will silently ignore a double call to pin_free Signed-off-by: Richard Genoud --- drivers/pinctrl/pinmux.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH] DTS at91sam9x5cm: add 1-wire chip on CM board

2013-03-20 Thread Richard Genoud
This add the 1-wire chip present on the CM board to the DTS. As the pin is also used by leds, tt's disabled by default. If the board really wants it, it can be enabled in the board DTS. Signed-off-by: Richard Genoud --- arch/arm/boot/dts/at91sam9x5cm.dtsi | 20 1 files

[PATCH] DTS at91sam9x5ek: i2c1 and i2c2 conflict with macb and lcd

2013-03-20 Thread Richard Genoud
on at91sam9x5ek, macb0 is enabled, so it conflicts with i2c2 (PB4) same for i2c1, (conflicts with LCD). Moreover, only i2c0 is used on this board. Signed-off-by: Richard Genoud --- arch/arm/boot/dts/at91sam9x5ek.dtsi |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git

[PATCH] DTS at91sam9x5ek: i2c1 and i2c2 conflict with macb and lcd

2013-03-20 Thread Richard Genoud
on at91sam9x5ek, macb0 is enabled, so it conflicts with i2c2 (PB4) same for i2c1, (conflicts with LCD). Moreover, only i2c0 is used on this board. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- arch/arm/boot/dts/at91sam9x5ek.dtsi |8 1 files changed, 0 insertions(+), 8

[PATCH] DTS at91sam9x5cm: add 1-wire chip on CM board

2013-03-20 Thread Richard Genoud
This add the 1-wire chip present on the CM board to the DTS. As the pin is also used by leds, tt's disabled by default. If the board really wants it, it can be enabled in the board DTS. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- arch/arm/boot/dts/at91sam9x5cm.dtsi | 20

[PATCH] BUG: pinmux: release only taken pins on error

2013-03-20 Thread Richard Genoud
-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/pinmux.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 1a00658..917e830 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -409,6

[PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-20 Thread Richard Genoud
If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will silently ignore a double call to pin_free Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/pinmux.c |5 +++-- 1 files changed, 3 insertions(+), 2

[PATCH] BUG: [RFC] pinctrl: pins are freed 2 times in pinctrl_bind_pins

2013-03-20 Thread Richard Genoud
thing to do. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/base/pinctrl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/base/pinctrl.c b/drivers/base/pinctrl.c index 67a274e..537406d 100644 --- a/drivers/base/pinctrl.c +++ b/drivers/base

Re: [PATCH] BUG: pinmux: release only taken pins on error

2013-03-20 Thread Richard Genoud
2013/3/20 Axel Lin axel@ingics.com: 2013/3/20 Richard Genoud richard.gen...@gmail.com: commit e38d457de7be63e6ced1ea254aa51466deb1fef0 pinctrl: pinmux: Release all taken pins in pinmux_enable_setting Introduced a bug in the release pin mechanism. All the pins (taken or not) where

Re: [PATCH] BUG: pinmux: forbid mux_usecount to be set at UINT_MAX

2013-03-20 Thread Richard Genoud
2013/3/20 Stephen Warren swar...@wwwdotorg.org: On 03/20/2013 05:31 AM, Richard Genoud wrote: If pin_free is called on a pin already freed, mux_usecount is set to UINT_MAX which is really a bad idea. This will silently ignore a double call to pin_free Shouldn't we WARN_ON(this case)? yes

Re: hv_netvsc: WARNING in softirq.c

2013-03-19 Thread Richard Genoud
2013/3/7 Richard Genoud : > 2013/3/6 Haiyang Zhang : >> I have found a simple way to reproduce this kind of warning: >> 1) reboot the VM (because this warning can be displayed only once.) >> 2) login to the host and open the VM [Settings] >> 3) Temporarily change t

Re: hv_netvsc: WARNING in softirq.c

2013-03-19 Thread Richard Genoud
2013/3/7 Richard Genoud richard.gen...@gmail.com: 2013/3/6 Haiyang Zhang haiya...@microsoft.com: I have found a simple way to reproduce this kind of warning: 1) reboot the VM (because this warning can be displayed only once.) 2) login to the host and open the VM [Settings] 3) Temporarily

Re: hv_netvsc: WARNING in softirq.c

2013-03-07 Thread Richard Genoud
2013/3/6 Haiyang Zhang : > I have found a simple way to reproduce this kind of warning: > 1) reboot the VM (because this warning can be displayed only once.) > 2) login to the host and open the VM [Settings] > 3) Temporarily change the Network adapter's option [Virtual Switch] to "Not >

Re: hv_netvsc: WARNING in softirq.c

2013-03-07 Thread Richard Genoud
2013/3/6 Haiyang Zhang haiya...@microsoft.com: I have found a simple way to reproduce this kind of warning: 1) reboot the VM (because this warning can be displayed only once.) 2) login to the host and open the VM [Settings] 3) Temporarily change the Network adapter's option [Virtual Switch] to

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey : > Hi Richard, > >>And if you want to tweak the BEB_LIMIT for each of your UBI partition, it's >>possible, via the ubiattach call ( get the master branchof of >>git://git.infradead.org/mtd-utils.git ) cf

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey : > Hi Richard, > > Thanks a lot for your explanations. Now at least I understand your logic. And > it seems to be reasonable. Your start point that all bad blocks for flash > chip could be placed in single MTD. This is really worst worst case, but... >

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey : > Hi Brian, > > Thanks for your answer. Ok, I have nothing against that my interpretation of > mtd_get_device_size() purpose is wrong. But what you mean under: "Because > your BEB_LIMIT=100, you are reserving 100*size/1024 (that is 9.8% of your > total size, or

Re: hv_netvsc: WARNING in softirq.c

2013-03-01 Thread Richard Genoud
2013/2/28 Haiyang Zhang : > We will look into this. And further info around the time will also be helpful. > > Thanks, > - Haiyang The only thing the admin sys could think about is a rsync process between the windows host and ANOTHER linux guest that ends at 22h30 more or less. (the other linux

Re: hv_netvsc: WARNING in softirq.c

2013-03-01 Thread Richard Genoud
2013/2/28 Haiyang Zhang haiya...@microsoft.com: We will look into this. And further info around the time will also be helpful. Thanks, - Haiyang The only thing the admin sys could think about is a rsync process between the windows host and ANOTHER linux guest that ends at 22h30 more or less.

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey sergey.velykokha...@mcc-med.de: Hi Brian, Thanks for your answer. Ok, I have nothing against that my interpretation of mtd_get_device_size() purpose is wrong. But what you mean under: Because your BEB_LIMIT=100, you are reserving 100*size/1024 (that is 9.8% of

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey sergey.velykokha...@mcc-med.de: Hi Richard, Thanks a lot for your explanations. Now at least I understand your logic. And it seems to be reasonable. Your start point that all bad blocks for flash chip could be placed in single MTD. This is really worst worst

Re: Bug in mtd_get_device_size()?

2013-03-01 Thread Richard Genoud
2013/3/1 Velykokhatko, Sergey sergey.velykokha...@mcc-med.de: Hi Richard, And if you want to tweak the BEB_LIMIT for each of your UBI partition, it's possible, via the ubiattach call ( get the master branchof of git://git.infradead.org/mtd-utils.git ) cf

hv_netvsc: WARNING in softirq.c

2013-02-28 Thread Richard GENOUD
Hi, Here is the kernel trace I got this morning (kern.log): Feb 27 22:32:59 devlabo kernel: [10688.187062] hv_vmbus: child device vmbus_0_8 unregistered Feb 27 22:34:37 devlabo kernel: [10688.187196] [ cut here ] Feb 27 22:34:37 devlabo kernel: [10688.187203] WARNING: at

hv_netvsc: WARNING in softirq.c

2013-02-28 Thread Richard GENOUD
Hi, Here is the kernel trace I got this morning (kern.log): Feb 27 22:32:59 devlabo kernel: [10688.187062] hv_vmbus: child device vmbus_0_8 unregistered Feb 27 22:34:37 devlabo kernel: [10688.187196] [ cut here ] Feb 27 22:34:37 devlabo kernel: [10688.187203] WARNING: at

Re: [v4 PATCH 06/12] spi/atmel_spi: add dmaengine support

2013-01-23 Thread Richard Genoud
ou.y...@atmel.com: fix DMA: OOPS if buffer > 4096 bytes] > Signed-off-by: Wenyou Yang > Cc: grant.lik...@secretlab.ca > Cc: spi-devel-gene...@lists.sourceforge.net > Cc: richard.gen...@gmail.com > --- > This patch is based on the original patch from Nicolas >

Re: [v4 PATCH 06/12] spi/atmel_spi: add dmaengine support

2013-01-23 Thread Richard Genoud
dmaengine support and merge the patches from Richard Genoud richard.gen...@gmail.com [PATCH] spi-atmel: update with dmaengine interface [PATCH] spi-atmel: fix __init/__devinit sections mismatch and Wenyou Yang add the code to support selecting the spi transfer mode, add support

Re: [v4 PATCH 00/12] atmel spi controller with dmaengine and device tree support

2013-01-18 Thread Richard Genoud
le both spi0 AND spi1, the spi0 doesn't work > BUG. > > 4./ Rebase v3.7-rc8. > > Best Regards, > Wenyou Yang. > > Nicolas Ferre (5): > spi/atmel_spi: add physical base address > spi/atmel_spi: call unmapping on transfers buffers > spi/atmel_spi: status

Re: [v4 PATCH 00/12] atmel spi controller with dmaengine and device tree support

2013-01-18 Thread Richard Genoud
address spi/atmel_spi: call unmapping on transfers buffers spi/atmel_spi: status information passed through controller data spi/atmel_spi: add flag to controller data for lock operations spi/atmel_spi: add dmaengine support Richard Genoud (6): spi/atmel_spi: fix spi-atmel driver to adapt

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-20 Thread Richard Genoud
2012/8/20 Artem Bityutskiy : > On Mon, 2012-08-20 at 08:55 +0200, Richard Genoud wrote: >> Hi Artem, >> 2012/8/19 Artem Bityutskiy : >> > Yeah, I wanted to make it 1..256 but forgot, will do now. 0..256 would >> > need some more work to avoid division

Re: [PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-20 Thread Richard Genoud
2012/8/20 Richard Genoud : > 2012/8/19 Shmulik Ladkani : >> Hi Richard, >> >> On Fri, 17 Aug 2012 16:35:22 +0200 Richard Genoud >> wrote: >>> + "MTD devices may be specified by their number, name, or >

Re: [PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-20 Thread Richard Genoud
2012/8/19 Shmulik Ladkani : > Hi Richard, > > On Fri, 17 Aug 2012 16:35:22 +0200 Richard Genoud > wrote: >> + "MTD devices may be specified by their number, name, or >> path to the MTD character device node.\n" >> +

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-20 Thread Richard Genoud
Hi Artem, 2012/8/19 Artem Bityutskiy : > Yeah, I wanted to make it 1..256 but forgot, will do now. 0..256 would > need some more work to avoid division by 0. Division by 0 is handled in the get_bad_peb_limit() function, I don't see another dangerous place. So, I think that we can change back the

Re: [PATCH 5/8] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev

2012-08-20 Thread Richard Genoud
Hi Shmulik, 2012/8/19 Shmulik Ladkani : > Hi Richard, > > On Fri, 17 Aug 2012 16:35:21 +0200 Richard Genoud > wrote: >> + /* >> + * A value of 0 is forced to the default value to keep the same >> + * behavior between ubiattach command and module pa

Re: [PATCH 5/8] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev

2012-08-20 Thread Richard Genoud
Hi Shmulik, 2012/8/19 Shmulik Ladkani shmulik.ladk...@gmail.com: Hi Richard, On Fri, 17 Aug 2012 16:35:21 +0200 Richard Genoud richard.gen...@gmail.com wrote: + /* + * A value of 0 is forced to the default value to keep the same + * behavior between ubiattach command

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-20 Thread Richard Genoud
Hi Artem, 2012/8/19 Artem Bityutskiy dedeki...@gmail.com: Yeah, I wanted to make it 1..256 but forgot, will do now. 0..256 would need some more work to avoid division by 0. Division by 0 is handled in the get_bad_peb_limit() function, I don't see another dangerous place. So, I think that we can

Re: [PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-20 Thread Richard Genoud
2012/8/19 Shmulik Ladkani shmulik.ladk...@gmail.com: Hi Richard, On Fri, 17 Aug 2012 16:35:22 +0200 Richard Genoud richard.gen...@gmail.com wrote: + MTD devices may be specified by their number, name, or path to the MTD character device node.\n

Re: [PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-20 Thread Richard Genoud
2012/8/20 Richard Genoud richard.gen...@gmail.com: 2012/8/19 Shmulik Ladkani shmulik.ladk...@gmail.com: Hi Richard, On Fri, 17 Aug 2012 16:35:22 +0200 Richard Genoud richard.gen...@gmail.com wrote: + MTD devices may be specified by their number, name, or path to the MTD

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-20 Thread Richard Genoud
2012/8/20 Artem Bityutskiy dedeki...@gmail.com: On Mon, 2012-08-20 at 08:55 +0200, Richard Genoud wrote: Hi Artem, 2012/8/19 Artem Bityutskiy dedeki...@gmail.com: Yeah, I wanted to make it 1..256 but forgot, will do now. 0..256 would need some more work to avoid division by 0. Division

[PATCH 2/4] sync include/mtd/ubi-user.h: add max_beb_per1024 parameter

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud --- include/mtd/ubi-user.h | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 123951f..32771cf 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h @@ -222,6

[PATCH 4/4] ubiattach: introduce max_beb_per1024 in UBI_IOCATT

2012-08-17 Thread Richard Genoud
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 --- tests/fs-tests/integrity/integck.c

[PATCH 3/4] sync include/mtd/ubi-user.h: DROP CONFIG_MTD_UBI_BEB_LIMIT

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud --- include/mtd/ubi-user.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 32771cf..44720d3 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h @@ -259,8 +259,8 @@ enum

[PATCH 1/4] sync include/mtd/ubi-user.h with kernel v3.6-rc1

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud --- include/mtd/ubi-user.h | 138 +++- 1 files changed, 67 insertions(+), 71 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 296efae..123951f 100644 --- a/include/mtd/ubi-user.h +++ b

[PATCH 0/4] mtd-utils/ubiattach: introduce max_beb_per1024 in UBI_IOCATT

2012-08-17 Thread Richard Genoud
, and you can always squash the first 2 or 3 patches into 1). Best Regards, Richard. Richard Genoud (4): sync include/mtd/ubi-user.h with kernel v3.6-rc1 sync include/mtd/ubi-user.h: add max_beb_per1024 parameter sync include/mtd/ubi-user.h: DROP CONFIG_MTD_UBI_BEB_LIMIT ubiattach: introduce

[PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-17 Thread Richard Genoud
r: ubi.mtd=[,[,max_beb_per1024]] Signed-off-by: Richard Genoud --- drivers/mtd/ubi/Kconfig |2 ++ drivers/mtd/ubi/build.c | 38 -- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index f32687

[PATCH 7/8] UBI: add ioctl for max_beb_per1024

2012-08-17 Thread Richard Genoud
t that via 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 --- drivers/mtd/ubi/Kconfig |3 ++- d

[PATCH 8/8] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT

2012-08-17 Thread Richard Genoud
This option can be set by a kernel parameter and an ioctl, so we may not need the kernel config option any more. Signed-off-by: Richard Genoud --- arch/arm/configs/sam9_l9260_defconfig |1 - drivers/mtd/ubi/Kconfig | 29 - drivers/mtd/ubi/build.c

[PATCH 5/8] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev

2012-08-17 Thread Richard Genoud
max_beb_per1024 shouldn't be negative, and a 0 value will be treated as the default value. Signed-off-by: Richard Genoud --- drivers/mtd/ubi/build.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 58fe53d

[PATCH 4/8] UBI: prepare for max_beb_per1024 module parameter addition

2012-08-17 Thread Richard Genoud
This patch prepare the way for the addition of max_beb_per1024 module parameter. There's no functional change. Signed-off-by: Richard Genoud --- drivers/mtd/ubi/build.c | 14 -- drivers/mtd/ubi/cdev.c |3 ++- drivers/mtd/ubi/ubi.h |3 ++- 3 files changed, 12 insertions

[PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud --- drivers/mtd/ubi/build.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 82d11e1..1f45f51 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -46,6 +46,9

[PATCH 2/8] UBI: separate bad_peb_limit in a function

2012-08-17 Thread Richard Genoud
No functional changes here, just to prepare for next patch. Signed-off-by: Richard Genoud --- drivers/mtd/ubi/build.c | 57 --- 1 files changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index

[PATCH 1/8] arm: sam9_l9260_defconfig: adjust UBI bad eraseblocks limit

2012-08-17 Thread Richard Genoud
From: Artem Bityutskiy UBI has changed the MTD_UBI_BEB_LIMIT semantics. It used to be a percent of total amount of eraseblock in the partition, and now it is the maximum amount of bad eraseblocks on the entire devise per 1024 eraseblocks. So not only the units changed, but also the meaning. But

[PATCH 0/8] UBI: add max_beb_per1024 parameter / ioctl

2012-08-17 Thread Richard Genoud
in sam9_l9260_defconfig, you can set it at 25 if you want (as it's the value from the datasheet). Best Regards Richard. Artem Bityutskiy (1): arm: sam9_l9260_defconfig: adjust UBI bad eraseblocks limit Richard Genoud (7): UBI: separate bad_peb_limit in a function UBI: introduce

Re: [PATCH 1/2] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-17 Thread Richard Genoud
2012/8/17 Artem Bityutskiy : > Richard, would you please split this series differently: > > 1. Separate out the calculations to the get_bad_peb_limit() func. > 2. Invent > 2. Add the module parameter > 3. Extends the ioctl > 4. Removes the Kconfig option > > This will be much easier to review. ok,

Re: [PATCH] BUG: clk_find() misses some clocks

2012-08-17 Thread Richard Genoud
ID, it must match > * If an entry has a connection ID, it must match > * Then we take the most specific entry - with the following > * order of precedence: dev+con > dev only > con only. > > On Fri, Aug 17, 2012 at 11:47:23AM +0200, Richard Genoud wrote: >> if a cloc

[PATCH] BUG: clk_find() misses some clocks

2012-08-17 Thread Richard Genoud
our clock won't be selected */ continue; match += 1; } if (match > best_found) { cl = p; if (match != best_possible) best_found = match; else

[PATCH] BUG: clk_find() misses some clocks

2012-08-17 Thread Richard Genoud
; match += 1; } if (match best_found) { cl = p; if (match != best_possible) best_found = match; else break; } } Signed-off-by: Richard Genoud richard.gen...@gmail.com

Re: [PATCH] BUG: clk_find() misses some clocks

2012-08-17 Thread Richard Genoud
ID, it must match * If an entry has a connection ID, it must match * Then we take the most specific entry - with the following * order of precedence: dev+con dev only con only. On Fri, Aug 17, 2012 at 11:47:23AM +0200, Richard Genoud wrote: if a clock is declared like

Re: [PATCH 1/2] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-17 Thread Richard Genoud
2012/8/17 Artem Bityutskiy dedeki...@gmail.com: Richard, would you please split this series differently: 1. Separate out the calculations to the get_bad_peb_limit() func. 2. Invent 2. Add the module parameter 3. Extends the ioctl 4. Removes the Kconfig option This will be much easier to

[PATCH 0/8] UBI: add max_beb_per1024 parameter / ioctl

2012-08-17 Thread Richard Genoud
in sam9_l9260_defconfig, you can set it at 25 if you want (as it's the value from the datasheet). Best Regards Richard. Artem Bityutskiy (1): arm: sam9_l9260_defconfig: adjust UBI bad eraseblocks limit Richard Genoud (7): UBI: separate bad_peb_limit in a function UBI: introduce

[PATCH 1/8] arm: sam9_l9260_defconfig: adjust UBI bad eraseblocks limit

2012-08-17 Thread Richard Genoud
From: Artem Bityutskiy artem.bityuts...@linux.intel.com UBI has changed the MTD_UBI_BEB_LIMIT semantics. It used to be a percent of total amount of eraseblock in the partition, and now it is the maximum amount of bad eraseblocks on the entire devise per 1024 eraseblocks. So not only the units

[PATCH 2/8] UBI: separate bad_peb_limit in a function

2012-08-17 Thread Richard Genoud
No functional changes here, just to prepare for next patch. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/mtd/ubi/build.c | 57 --- 1 files changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/mtd/ubi/build.c b

[PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/mtd/ubi/build.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 82d11e1..1f45f51 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi

[PATCH 4/8] UBI: prepare for max_beb_per1024 module parameter addition

2012-08-17 Thread Richard Genoud
This patch prepare the way for the addition of max_beb_per1024 module parameter. There's no functional change. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/mtd/ubi/build.c | 14 -- drivers/mtd/ubi/cdev.c |3 ++- drivers/mtd/ubi/ubi.h |3 ++- 3 files

[PATCH 5/8] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev

2012-08-17 Thread Richard Genoud
max_beb_per1024 shouldn't be negative, and a 0 value will be treated as the default value. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/mtd/ubi/build.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd

[PATCH 8/8] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT

2012-08-17 Thread Richard Genoud
This option can be set by a kernel parameter and an ioctl, so we may not need the kernel config option any more. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- arch/arm/configs/sam9_l9260_defconfig |1 - drivers/mtd/ubi/Kconfig | 29

[PATCH 7/8] UBI: add ioctl for max_beb_per1024

2012-08-17 Thread Richard Genoud
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/Kconfig

[PATCH 6/8] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-17 Thread Richard Genoud
|num|path[,vid_hdr_offs[,max_beb_per1024]] Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/mtd/ubi/Kconfig |2 ++ drivers/mtd/ubi/build.c | 38 -- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/mtd/ubi/Kconfig b

[PATCH 0/4] mtd-utils/ubiattach: introduce max_beb_per1024 in UBI_IOCATT

2012-08-17 Thread Richard Genoud
, and you can always squash the first 2 or 3 patches into 1). Best Regards, Richard. Richard Genoud (4): sync include/mtd/ubi-user.h with kernel v3.6-rc1 sync include/mtd/ubi-user.h: add max_beb_per1024 parameter sync include/mtd/ubi-user.h: DROP CONFIG_MTD_UBI_BEB_LIMIT ubiattach: introduce

[PATCH 1/4] sync include/mtd/ubi-user.h with kernel v3.6-rc1

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud richard.gen...@gmail.com --- include/mtd/ubi-user.h | 138 +++- 1 files changed, 67 insertions(+), 71 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 296efae..123951f 100644 --- a/include

[PATCH 3/4] sync include/mtd/ubi-user.h: DROP CONFIG_MTD_UBI_BEB_LIMIT

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud richard.gen...@gmail.com --- include/mtd/ubi-user.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 32771cf..44720d3 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h

[PATCH 4/4] ubiattach: introduce max_beb_per1024 in UBI_IOCATT

2012-08-17 Thread Richard Genoud
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 --- tests/fs-tests/integrity

[PATCH 2/4] sync include/mtd/ubi-user.h: add max_beb_per1024 parameter

2012-08-17 Thread Richard Genoud
Signed-off-by: Richard Genoud richard.gen...@gmail.com --- include/mtd/ubi-user.h | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 123951f..32771cf 100644 --- a/include/mtd/ubi-user.h +++ b/include

[PATCH] UBI: use a config value for default BEB limit

2012-08-16 Thread Richard Genoud
Signed-off-by: Richard Genoud --- 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/configs/sam9_l9260

[PATCH 1/2] UBI: replace MTD_UBI_BEB_LIMIT with module parameter

2012-08-16 Thread Richard Genoud
r: ubi.mtd=[,[,max_beb_per1024]] Signed-off-by: Richard Genoud --- arch/arm/configs/sam9_l9260_defconfig |1 - drivers/mtd/ubi/Kconfig | 26 - drivers/mtd/ubi/build.c | 93 ++--- drivers/mtd/ubi/cdev.c|3 +

[PATCH 2/2] UBI: add ioctl for max_beb_per1024

2012-08-16 Thread Richard Genoud
t that via 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 --- drivers/mtd/ubi/cdev.c |9

[PATCH 0/2] splitting "UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter"

2012-08-16 Thread Richard Genoud
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

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-16 Thread Richard Genoud
2012/8/16 Shmulik Ladkani : > On Thu, 16 Aug 2012 16:28:38 +0300 Artem Bityutskiy > wrote: >> On Thu, 2012-08-16 at 11:57 +0300, Shmulik Ladkani wrote: >> > >> > For the simplest systems (those having one ubi device) that need a >> > limit >> > *other* than the default (20 per 1024), they can

Re: [PATCH 3/4] UBI: use the whole MTD device size to get bad_peb_limit

2012-08-16 Thread Richard Genoud
2012/8/16 Shmulik Ladkani : > Hi, > > One more thing... > > On Wed, 15 Aug 2012 18:08:51 +0300 Artem Bityutskiy > wrote: >> config MTD_UBI_BEB_LIMIT >> - int "Percentage of maximum expected bad eraseblocks" >> - default 2 >> - range 0 25 >> + int "Maximum expected bad eraseblock

Re: [PATCH 3/4] UBI: use the whole MTD device size to get bad_peb_limit

2012-08-16 Thread Richard Genoud
2012/8/16 Shmulik Ladkani : > Hi Artem, Richard, > > On Wed, 15 Aug 2012 18:08:51 +0300 Artem Bityutskiy > wrote: >> 1. Invalid blocks are block that contain one or more bad bits beyond >> ECC. > > I would remove this one sentence from the log, it is misleading; invalid > blocks are not

Re: [PATCH 4/4] UBI: replace MTD_UBI_BEB_LIMIT with user-space parameter

2012-08-16 Thread Richard Genoud
2012/8/16 Shmulik Ladkani : > Hi Richard, > > Sorry for reviewing this late... > > On Tue, 10 Jul 2012 18:23:42 +0200 Richard Genoud > wrote: >> -config MTD_UBI_BEB_LIMIT >> - int "Maximum expected bad eraseblocks per 1024 eraseblocks" >> -

<    3   4   5   6   7   8   9   >