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

2012-07-18 Thread Richard Genoud
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

Re: [PATCH RFC] ARM: don't allow to register the early_console twice

2013-04-18 Thread Richard GENOUD
(AT91SAMG35 thanks to Richard Genoud), with and with CONFIG_SMP selected. This patch simply doesn't allow to call twice register_console() with the early_console. Signed-off-by: Gregory CLEMENT gregory.clem...@free-electrons.com --- arch/arm/kernel/early_printk.c |6 +- 1 file

Re: hv_netvsc: WARNING in softirq.c

2013-04-05 Thread Richard Genoud
2013/3/19 Richard Genoud richard.gen...@gmail.com: 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

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

2013-03-28 Thread Richard GENOUD
On [mer., 27.03.2013 17:55:45], Stephen Warren wrote: On 03/25/2013 08:47 AM, Richard Genoud wrote: 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

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

2013-03-28 Thread Richard GENOUD
On [jeu., 28.03.2013 11:38:23], Stephen Warren wrote: On 03/28/2013 11:34 AM, Richard GENOUD wrote: On [mer., 27.03.2013 17:55:45], Stephen Warren wrote: On 03/25/2013 08:47 AM, Richard Genoud wrote: If a new state is applied, the groups configured in the old state but not in the new

[PATCH 1/2] pinctrl: select_state: don't call pinctrl_free_setting on error

2013-03-29 Thread Richard Genoud
(the closest thing I can think about for unmuxing a pin is muxing it as GPIO input). Signed-off-by: Richard Genoud richard.gen...@gmail.com --- This commit is on top of: [PATCH 3/3] pinctrl: pinctrl_select_state: set the old_state back on error drivers/pinctrl/core.c | 10 +- 1 files

[PATCH 2/2] pinctrl: simplify the re-enable old state code in pinctrl_select_state

2013-03-29 Thread Richard Genoud
Instead of just enabling the settings that were disabled in the 1st loop, it's simpler to recall pinctrl_select_state with the old state. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- drivers/pinctrl/core.c | 22 +++--- 1 files changed, 3 insertions(+), 19

Re: [PATCH v8 1/8] spi/spi-atmel: add physical base address

2013-04-03 Thread Richard GENOUD
int atmel_spi_probe(struct platform_device *pdev) as-regs = ioremap(regs-start, resource_size(regs)); if (!as-regs) goto out_free_buffer; + as-phybase = regs-start; as-irq = irq; as-clk = clk; -- 1.7.9.5 Tested-by: Richard Genoud richard.gen

Re: [PATCH v8 2/8] spi/spi-atmel: add flag to controller data for lock operations

2013-04-03 Thread Richard GENOUD
; gpio_free(gpio); -- 1.7.9.5 On sam9g35 with DMA and PIO (3.9-rc5 + device tree patches) Tested-by: Richard Genoud richard.gen...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v8 3/8] spi/spi-atmel: add dmaengine support

2013-04-03 Thread Richard GENOUD
dmaengine support and squash the below patches from Richard Genoud richard.gen...@gmail.com - update with dmaengine interface - fix __init/__devinit sections mismatch - fix spi-atmel driver to adapt to slave_config changes - correct 16 bits transfers with DMA Hi, Richard

Re: [PATCH v8 8/8] ARM: dts: add pinctrl property for spi node for atmel SoC

2013-04-03 Thread Richard GENOUD
(3.9-rc5 + device tree patches) Tested-by: Richard Genoud richard.gen...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

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

2013-04-03 Thread Richard Genoud
2013/4/3 Linus Walleij linus.wall...@linaro.org: On Thu, Mar 28, 2013 at 4:47 PM, Richard Genoud richard.gen...@gmail.com wrote: 2013/3/28 Stephen Warren swar...@wwwdotorg.org: Again, pinconf_free_setting() is all about freeing any dynamically allocated storage required to represent

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

[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

[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

[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: [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 +-

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

2013-03-28 Thread Richard Genoud
2013/3/28 Stephen Warren swar...@wwwdotorg.org: On 03/25/2013 08:47 AM, Richard Genoud wrote: 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. diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl

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

2013-03-28 Thread Richard Genoud
2013/3/28 Stephen Warren swar...@wwwdotorg.org: On 03/25/2013 08:47 AM, Richard Genoud wrote: 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

[PATCH 1/3] pinctrl: use dev_info instead of pr_info in pinctrl_select_state_locked

2013-03-28 Thread Richard Genoud
And remove superfluous brackets. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- If it's not too late, it can be squashed with commit: 3102a76cfbf9ac4ae0cf54c7452f7ba4292a4760 pinctrl: disable and free setting in select_state in case of error drivers/pinctrl/core.c |5 ++--- 1

[PATCH 2/3] pinctrl: remove superfluous optimization in pinctrl_select_state_locked

2013-03-28 Thread Richard Genoud
As Stephen Warren suggested, checking first if the setting-node entry is the first in the list or not is superfluous, as it is checked again in the list_for_each_entry bellow. So, remove it, the code will be simpler and lighter ! Signed-off-by: Richard Genoud richard.gen...@gmail.com --- If can

[PATCH 3/3] pinctrl: pinctrl_select_state: set the old_state back on error

2013-03-28 Thread Richard Genoud
In unapply_new_state, the old state is re-applied, but p-state is not set back as it should. Signed-off-by: Richard Genoud richard.gen...@gmail.com --- This one can be squshed with commit: 50cf7c8ab324de348990bb028ad9ed10872d527a pinctrl: re-enable old state in case of error

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

2013-03-28 Thread Richard Genoud
2013/3/28 Stephen Warren swar...@wwwdotorg.org: On 03/28/2013 04:55 AM, Richard Genoud wrote: 2013/3/28 Stephen Warren swar...@wwwdotorg.org: On 03/25/2013 08:47 AM, Richard Genoud wrote: If enabling a pin fails in pinctrl_select_state_locked(), all the previous enabled pins have

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

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: 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

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
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 3/4] UBI: use the whole MTD device size to get bad_peb_limit

2012-08-16 Thread Richard Genoud
2012/8/15 Artem Bityutskiy dedeki...@gmail.com: On Tue, 2012-07-10 at 18:23 +0200, Richard Genoud wrote: + /* we are using here the whole MTD device size and not + * the MTD partition size because the maximum number of + * bad

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 shmulik.ladk...@gmail.com: Hi Richard, Sorry for reviewing this late... On Tue, 10 Jul 2012 18:23:42 +0200 Richard Genoud richard.gen...@gmail.com wrote: -config MTD_UBI_BEB_LIMIT - int Maximum expected bad eraseblocks per 1024 eraseblocks - default 20

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 shmulik.ladk...@gmail.com: Hi Artem, Richard, On Wed, 15 Aug 2012 18:08:51 +0300 Artem Bityutskiy dedeki...@gmail.com 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;

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 shmulik.ladk...@gmail.com: Hi, One more thing... On Wed, 15 Aug 2012 18:08:51 +0300 Artem Bityutskiy dedeki...@gmail.com wrote: config MTD_UBI_BEB_LIMIT - int Percentage of maximum expected bad eraseblocks - default 2 - range 0 25 + int

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 shmulik.ladk...@gmail.com: On Thu, 16 Aug 2012 16:28:38 +0300 Artem Bityutskiy dedeki...@gmail.com 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

[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. Richard

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

2012-08-16 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/cdev.c

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

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

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

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

[PATCH] Pinctrl header: trivial: declare struct device

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

[PATCH] trivial: pinctrl core: remove extraneous code lines

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

[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

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

Re: [PATCH 0/5] ubi: Fix bad PEBs reserve caclulation

2012-07-06 Thread Richard Genoud
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

Re: [PATCH 0/5] ubi: Fix bad PEBs reserve caclulation

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

Re: [PATCH 0/5] ubi: Fix bad PEBs reserve caclulation

2012-07-09 Thread Richard Genoud
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

Re: [PATCH 2/5] ubi: Limit amount of reserved eraseblocks for bad PEB handling

2012-07-09 Thread Richard Genoud
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

[PATCH 0/4] UBI: Use the whole NAND device to calculate max bad block number

2012-07-10 Thread Richard Genoud
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

[PATCH 2/4] MTD parts: introduce mtd_get_device_size()

2012-07-10 Thread Richard Genoud
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

[PATCH] ubiattach: introduce max_beb_per1024 in UBI_IOCATT

2012-07-10 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 --- include/mtd/ubi-user.h

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

2012-07-10 Thread Richard Genoud
|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

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

2012-07-10 Thread Richard Genoud
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

[PATCH 1/4] mtd_is_partition: struct mtd_info should be const

2012-07-10 Thread Richard Genoud
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

Re: [PATCH v6 2/8] ASoC: atmel: machine driver for at91sam9x5-wm8731 boards

2013-08-07 Thread Richard Genoud
2013/8/6 Mark Brown broo...@kernel.org: On Tue, Jul 30, 2013 at 12:32:03PM +0200, Richard Genoud wrote: From: Nicolas Ferre nicolas.fe...@atmel.com Description of the Asoc machine driver for an at91sam9x5 based board with a wm8731 audio DAC. Wm8731 is clocked by a crystal and used

Re: [PATCH] ARM: at91/dt: split sam9x5 peripheral definitions

2013-08-07 Thread Richard Genoud
2013/8/7 Boris BREZILLON b.brezil...@overkiz.com: This patch splits the sam9x5 peripheral definitions into: - a common base for all sam9x5 SoCs (at91sam9x5.dtsi) - several optional peripheral definitions which will be included by specific sam9x5 SoCs (at91sam9x5_'periph name'.dtsi) This

Re: [PATCH] ARM: at91/dt: split sam9x5 peripheral definitions

2013-08-07 Thread Richard Genoud
2013/8/7 boris brezillon b.brezil...@overkiz.com: Hello Richard, On 07/08/2013 12:38, Richard Genoud wrote: 2013/8/7 Boris BREZILLON b.brezil...@overkiz.com: This patch splits the sam9x5 peripheral definitions into: - a common base for all sam9x5 SoCs (at91sam9x5.dtsi) - several optional

Re: [PATCH v2 00/42] ARM: at91: move to common clk framework

2013-07-26 Thread Richard Genoud
On 17/07/2013 15:34, Boris BREZILLON wrote: Hello, This patch series is a proposal to move at91 clock implementation to common clk framework. Most of the clock provided by the PMC (Power Management Controller) are implemented : - main clock (main oscillator) - pll clocks - master clock

Re: [PATCH v2 00/42] ARM: at91: move to common clk framework

2013-07-29 Thread Richard Genoud
2013/7/26 boris brezillon b.brezil...@overkiz.com: On 26/07/2013 17:44, boris brezillon wrote: I found 2 bugs: 1) the main frequency ready test in recalc_rate function is wrong 2) the common clk framework uses the first match for dt clk registration and main clk has this compatible

Re: [PATCH v2 00/42] ARM: at91: move to common clk framework

2013-07-29 Thread Richard Genoud
2013/7/29 boris brezillon b.brezil...@overkiz.com: On 29/07/2013 10:00, Richard Genoud wrote: 2013/7/26 boris brezillon b.brezil...@overkiz.com: On 26/07/2013 17:44, boris brezillon wrote: I found 2 bugs: 1) the main frequency ready test in recalc_rate function is wrong 2) the common clk

Re: [PATCH v2 00/42] ARM: at91: move to common clk framework

2013-07-29 Thread Richard Genoud
2013/7/29 boris brezillon b.brezil...@overkiz.com: On 29/07/2013 16:18, Richard Genoud wrote: 2013/7/29 boris brezillon b.brezil...@overkiz.com: On 29/07/2013 10:00, Richard Genoud wrote: 2013/7/26 boris brezillon b.brezil...@overkiz.com: On 26/07/2013 17:44, boris brezillon wrote: I

Re: sun4i_handle_irq: WARNING at net/ipv4/tcp_input.c:2711 tcp_fastretrans_alert

2013-08-26 Thread Richard Genoud
2013/8/23 Maxime Ripard maxime.rip...@free-electrons.com: Hi Richard, On Wed, Aug 21, 2013 at 11:47:20AM +0200, Richard GENOUD wrote: Hi Maxime, Stephan I just realise that, *sometimes*, I have some warnings on my cubieboard (6 since the 22 of july, and the board is runnning 24/24). Wow

[PATCH] proc: return on proc_readdir error

2013-08-19 Thread Richard Genoud
are missing. (described more in details here: https://lkml.org/lkml/2013/8/12/288 ) Signed-off-by: Richard Genoud richard.gen...@gmail.com --- [added Linus Torvalds and Andrew Morton in CC since Al Viro seems to be on holidays and it's starting to getting late in the -rc cycles] fs/proc/root.c |4

Re: [PATCH] proc: return on proc_readdir error

2013-08-20 Thread Richard Genoud
2013/8/20 Marc Dionne marc.c.dio...@gmail.com: On Mon, Aug 19, 2013 at 7:49 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Mon, Aug 19, 2013 at 1:33 PM, Marc Dionne marc.c.dio...@gmail.com wrote: By my reading that commit (f0c3b5093add) also made proc_readdir always return 0, so

Re: [PATCH 1/8] ARM: at91: move peripheral id definitions to dt-bindings include dir

2013-08-20 Thread Richard Genoud
would you do that? This was requested by Jean-Christophe Plagniol-Villard (and proposed by Richard Genoud) for the 3rd version of the ARM: at91: move to common clk framework patch series (see https://lkml.org/lkml/2013/7/29/361) and thought it was a good idea too (even if I didn't know where

sun4i_handle_irq: WARNING at net/ipv4/tcp_input.c:2711 tcp_fastretrans_alert

2013-08-21 Thread Richard GENOUD
Hi Maxime, Stephan I just realise that, *sometimes*, I have some warnings on my cubieboard (6 since the 22 of july, and the board is runnning 24/24). It has happened also on 3.10 + emac patches. Here it is: [27224.06] [ cut here ] [27224.07] WARNING: CPU: 0 PID: 0

Re: Regression V3.11-rc1 bisected: [readdir] convert procfs

2013-08-14 Thread Richard Genoud
2013/8/12 Richard Genoud richard.gen...@gmail.com: Hi, I've found something peculiar while I was testing v3.11: There's a lot of directory missing (actually hiding) in /proc : /proc/sys/, /proc/fs/, /proc/bus/ etc... all the directories that are not PIDs are in stealth mode: they don't

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/9 Mark Brown broo...@kernel.org: On Tue, Jul 09, 2013 at 04:25:27PM +0200, Richard Genoud wrote: +/* + * Authorized rates are: + * Rate = MCLK_RATE / (n * 2) + * Where n is in [1..4095] + * (cf register SSC_CMR) + */ +static unsigned int rates[] = { + 8000, + 16000

Re: [PATCH v4 1/7] sound: sam9x5_wm8731: machine driver for at91sam9x5 wm8731 boards

2013-07-10 Thread Richard Genoud
2013/7/10 Bo Shen voice.s...@atmel.com: Hi Richard, Hi ! On 7/9/2013 22:25, Richard Genoud wrote: [snip] +#include linux/module.h +#include linux/moduleparam.h +#include linux/kernel.h +#include linux/clk.h +#include linux/timer.h +#include linux/interrupt.h +#include linux

  1   2   3   4   5   6   7   8   9   >