Re: [PATCH net v2 0/3] Avoid calling WARN_ON() on allocation failure in cfg802154_switch_netns()

2025-04-03 Thread Miquel Raynal
On 03/04/2025 at 11:20:18 +03, Ivan Abramov wrote: > This series was inspired by Syzkaller report on warning in > cfg802154_switch_netns(). This series has received reviews under the form of Reviewed-by tags. You are in charge of carrying those tags over versions. Please collect and resubmit the

Re: [PATCH 0/3] Avoid calling WARN_ON() on allocation failure in cfg802154_switch_netns()

2025-03-28 Thread Miquel Raynal
Hello Ivan, On 28/03/2025 at 04:04:24 +03, Ivan Abramov wrote: > This series was inspired by Syzkaller report on warning in > cfg802154_switch_netns(). Thanks for the series, lgtm. Reviewed-by: Miquel Raynal Miquèl

Re: [PATCH net-next v3 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Miquel Raynal
ee descriptions. > > Reviewed-by: Linus Walleij > Signed-off-by: Andy Shevchenko Nice. Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH net-next v2 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-04 Thread Miquel Raynal
On 03/03/2025 at 18:49:09 +02, Andy Shevchenko wrote: > Access to platform data via dev_get_platdata() getter to make code cleaner. Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
Hi Andy, > @@ -350,8 +348,8 @@ struct work_priv_container { > * @extclockenable: true if the external clock is to be enabled > * @extclockfreq: frequency of the external clock > * @extclockgpio: ca8210 output gpio of the external clock > - * @gpio_reset: gpio number of ca8210 reset l

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
On 03/03/2025 at 18:28:41 +02, Andy Shevchenko wrote: > On Mon, Mar 03, 2025 at 05:20:59PM +0100, Miquel Raynal wrote: > > ... > >> > - * @gpio_reset: gpio number of ca8210 reset line >> > - * @gpio_irq: gpio number of ca8210 interrupt line >> &

Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Miquel Raynal
n accordance with [1] the protocol is little endian. > > Link: > https://www.cascoda.com/wp-content/uploads/2018/11/CA-8210_datasheet_0418.pdf > [1] > Signed-off-by: Andy Shevchenko Looks correct indeed, Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [RFC net-next] net: mac802154: Remove unused ieee802154_mlme_tx_one

2024-12-30 Thread Miquel Raynal
d. > > Remove it. > > Note, there's still a ieee802154_mlme_tx_one_locked() > variant that is used. > I don't remember what this is for. I didn't find any use of it in my desperately downstream branches, so it must be a leftover. Acked-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 13/11/2024 at 13:29:55 +03, Dmitry Antipov wrote: > On 11/12/24 4:41 PM, Lizhi Xu wrote: > >> mutex_lock(&sdata->local->iflist_mtx); >> +if (list_empty(&sdata->local->interfaces)) { >> +mutex_unlock(&sdata->local->iflist_mtx); >> +return; >> +} >> list

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-13 Thread Miquel Raynal
On 12/11/2024 at 21:41:45 +08, Lizhi Xu wrote: > On Tue, 12 Nov 2024 12:01:21 +0100, Miquel Raynal wrote: >>On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: >> >>> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: >>>> On 08/11/2024 at 22:54:20 +08, Li

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-12 Thread Miquel Raynal
On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: > On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: >> On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: >> >> > syzkaller reported a corrupted list in ieee802154_if_remove. [1] >> > >> > Remov

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-11 Thread Miquel Raynal
Hello, On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: > syzkaller reported a corrupted list in ieee802154_if_remove. [1] > > Remove an IEEE 802.15.4 network interface after unregister an IEEE 802.15.4 > hardware device from the system. > > CPU0 CPU1 >

Re: [PATCH net-next] ieee802154: Replace BOOL_TO_STR() with str_true_false()

2024-10-21 Thread Miquel Raynal
Hi Thorsten, thorsten.b...@linux.dev wrote on Sun, 20 Oct 2024 13:23:13 +0200: > Replace the custom BOOL_TO_STR() macro with the str_true_false() helper > function and remove the macro. > > Signed-off-by: Thorsten Blum Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH v2 6/8] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()

2024-10-08 Thread Miquel Raynal
ct, which > may allow use-after-free. > > Clear the sk pointer in the sock object on error. > > Signed-off-by: Ignat Korchagin Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH v2] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-20 Thread Miquel Raynal
ixes: e2c3e6f53a7a ("mac802154: Handle active scanning") > Signed-off-by: Jiawei Ye I think net maintainers now expect the Cc: stable tag to be put here when there is a reason to backport, which I believe is the case here. So please add this line here. > Please delete this blank

Re: [PATCH 4/7] net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-10 Thread Miquel Raynal
quot;ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver > driver") > Signed-off-by: Jinjie Ruan This one could go through wpan(-next), but otherwise: Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH RESEND] mac802154: Fix uninit-value access in ieee802154_hdr_push_sechdr

2023-12-04 Thread Miquel Raynal
Hi Zhang, zhang_shur...@foxmail.com wrote on Sat, 2 Dec 2023 22:58:52 +0800: > The syzkaller reported an issue: Subject should start with [PATCH wpan] > > BUG: KMSAN: uninit-value in ieee802154_hdr_push_sechdr > net/ieee802154/header_ops.c:54 [inline] > BUG: KMSAN: uninit-value in ieee802154

Re: [PATCH] [v2] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-26 Thread Miquel Raynal
Hi Dinghao, dinghao@zju.edu.cn wrote on Tue, 26 Sep 2023 11:22:44 +0800: > If of_clk_add_provider() fails in ca8210_register_ext_clock(), > it calls clk_unregister() to release priv->clk and returns an > error. However, the caller ca8210_probe() then calls ca8210_remove(), > where priv->clk i

Re: [PATCH] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-25 Thread Miquel Raynal
Hi Dinghao, dinghao@zju.edu.cn wrote on Mon, 25 Sep 2023 15:24:22 +0800: > If of_clk_add_provider() fails in ca8210_register_ext_clock(), > it calls clk_unregister() to release priv->clk and returns an > error. However, the caller ca8210_probe() then calls ca8210_remove(), > where priv->clk i

Re: [PATCH] mtd: rawnand: fix an error code in nand_setup_interface()

2021-04-17 Thread Miquel Raynal
Hi Dan, Dan Carpenter wrote on Sat, 17 Apr 2021 13:24:26 +0300: > On Fri, Apr 16, 2021 at 05:00:40PM +0200, Miquel Raynal wrote: > > Hi Dan, > > > > Dan Carpenter wrote on Wed, 14 Apr 2021 > > 08:56:33 +0300: > > > > > We should return an error c

Re: [PATCH] mtd: core: Constify buf in mtd_write_user_prot_reg()

2021-04-16 Thread Miquel Raynal
Hi Tudor, Tudor Ambarus wrote on Sat, 3 Apr 2021 09:09:31 +0300: > The write buffer comes from user and should be const. > Constify write buffer in mtd core and across all _write_user_prot_reg() > users. cfi_cmdset_{0001, 0002} and onenand_base will pay the cost of an > explicit cast to discard

Re: [PATCH] mtd: rawnand: fix an error code in nand_setup_interface()

2021-04-16 Thread Miquel Raynal
Hi Dan, Dan Carpenter wrote on Wed, 14 Apr 2021 08:56:33 +0300: > We should return an error code if the timing mode is not acknowledged > by the NAND chip. This truly is questionable (and I am not yet decided whether the answer should be yes or no). Returning an error here would produce the en

Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2

2021-04-08 Thread Miquel Raynal
Hi Daniel, Daniel Palmer wrote on Wed, 7 Apr 2021 21:01:01 +0900: > Hi Miquel, > > On Wed, 7 Apr 2021 at 17:02, Miquel Raynal wrote: > > You may look at micron_8_ecc_get_status() helper to guide you. But > > IMHO, if there are 0-3 bf, you should probably assume there wer

Re: [PATCH V2] mtd: phram: Fix error return code in phram_setup()

2021-04-08 Thread Miquel Raynal
Hi Yu, Yu Kuai wrote on Thu, 8 Apr 2021 21:38:12 +0800: > Return a negative error code from the error handling case instead > of 0, as done elsewhere in this function. > > Reported-by: Hulk Robot > Signed-off-by: Yu Kuai > --- > drivers/mtd/devices/phram.c | 1 + > 1 file changed, 1 insertio

Re: [PATCH 3/3] mtd: phram: Fix error return code in phram_setup()

2021-04-08 Thread Miquel Raynal
Hi Yu, Yu Kuai wrote on Thu, 8 Apr 2021 19:15:14 +0800: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Reported-by: Hulk Robot > Signed-off-by: Yu Kuai > --- > drivers/mtd/devices/phram.c | 1 + > 1 file changed, 1 i

Re: [PATCH] mtd: add OTP (one-time-programmable) erase ioctl

2021-04-08 Thread Miquel Raynal
Hello, Michael Walle wrote on Thu, 08 Apr 2021 08:55:42 +0200: > Hi Tudor, > > Am 2021-04-08 07:51, schrieb tudor.amba...@microchip.com: > > Would you please resend this patch, together with the mtd-utils > > and the SPI NOR patch in a single patch set? You'll help us all > > having all in a si

Re: [PATCH v11 1/4] dt-bindings: mtd: Convert Qcom NANDc binding to YAML

2021-04-07 Thread Miquel Raynal
On Fri, 2021-04-02 at 15:01:25 UTC, Manivannan Sadhasivam wrote: > Convert Qcom NANDc devicetree binding to YAML. > > Signed-off-by: Manivannan Sadhasivam > Reviewed-by: Rob Herring Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel

Re: [PATCH v11 2/4] dt-bindings: mtd: Add a property to declare secure regions in NAND chips

2021-04-07 Thread Miquel Raynal
On Fri, 2021-04-02 at 15:01:26 UTC, Manivannan Sadhasivam wrote: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like > Trustzone. So

Re: [PATCH v11 3/4] mtd: rawnand: Add support for secure regions in NAND memory

2021-04-07 Thread Miquel Raynal
On Fri, 2021-04-02 at 15:01:27 UTC, Manivannan Sadhasivam wrote: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like > Trustzone. So

Re: [PATCH v11 4/4] mtd: rawnand: qcom: Add missing nand_cleanup() in error path

2021-04-07 Thread Miquel Raynal
On Fri, 2021-04-02 at 15:01:28 UTC, Manivannan Sadhasivam wrote: > Add missing nand_cleanup() in the alloc_bam_transaction() error path > to cleanup the resources properly. > > Signed-off-by: Manivannan Sadhasivam Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/nex

Re: [PATCH] mtd: rawnand: qcom: Use dma_mapping_error() for error check

2021-04-07 Thread Miquel Raynal
On Mon, 2021-04-05 at 05:09:12 UTC, Manivannan Sadhasivam wrote: > dma_mapping_error() should be used for checking the error value of > dma_map_resource() API. > > Signed-off-by: Manivannan Sadhasivam Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. M

Re: [PATCH] mtd: nand: gpmi: Fix a double free in gpmi_nand_init

2021-04-07 Thread Miquel Raynal
On Sat, 2021-04-03 at 06:09:05 UTC, Lv Yunlong wrote: > If the callee gpmi_alloc_dma_buffer() failed to alloc memory for > this->raw_buffer, gpmi_free_dma_buffer() will be called to free > this->auxiliary_virt. But this->auxiliary_virt is still a non-NULL > and valid ptr. > > Then gpmi_alloc_dma_b

Re: [PATCH v2 2/2] Fix the issue for clearing status process

2021-04-07 Thread Miquel Raynal
Hi Yoshio, Yoshio Furuyama wrote on Tue, 6 Apr 2021 10:47:26 +0900: Could you add "mtd: nand: bbt:" as prefix for the title (same for the other patch, even though you're not the original author). > In the unlikely event of bad block, > it should update its block status to BBT, > In this case,

Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2

2021-04-07 Thread Miquel Raynal
Hi Daniel, Daniel Palmer wrote on Fri, 26 Mar 2021 23:09:28 +0900: > Hi Miquel, > > Sorry for the constant pestering on this.. > > On Tue, 23 Mar 2021 at 23:06, Miquel Raynal wrote: > > > # nandbiterrs -i /dev/mtd1 > > > incremental biterrors test > >

Re: [PATCH] mtd: rawnand: nand_bbt: Skip bad blocks when searching for the BBT in NAND

2021-03-28 Thread Miquel Raynal
On Thu, 2021-03-25 at 10:23:37 UTC, Stefan Riedmueller wrote: > The blocks containing the bad block table can become bad as well. So > make sure to skip any blocks that are marked bad when searching for the > bad block table. > > Otherwise in very rare cases where two BBT blocks wear out it might

Re: [PATCH] mtd: require write permissions for locking and badblock ioctls

2021-03-28 Thread Miquel Raynal
On Wed, 2021-03-03 at 15:57:35 UTC, Michael Walle wrote: > MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require > write permission. Depending on the hardware MEMLOCK might even be > write-once, e.g. for SPI-NOR flashes with their WP# tied to GND. OTPLOCK > is always write-once. > >

Re: [PATCH v7 1/3] mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

2021-03-28 Thread Miquel Raynal
On Fri, 2021-03-12 at 06:28:19 UTC, Ansuel Smith wrote: > Partitions that contains the nvmem-cells compatible will register > their direct subonodes as nvmem cells and the node will be treated as a > nvmem provider. > > Signed-off-by: Ansuel Smith > Tested-by: Rafał Miłecki Applied to https://g

Re: [PATCH v7 2/3] devicetree: nvmem: nvmem: drop $nodename restriction

2021-03-28 Thread Miquel Raynal
On Fri, 2021-03-12 at 06:28:20 UTC, Ansuel Smith wrote: > Drop $nodename restriction as now mtd partition can also be used as > nvmem provider. > > Signed-off-by: Ansuel Smith > Reviewed-by: Rob Herring Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Re: [PATCH v7 3/3] dt-bindings: mtd: Document use of nvmem-cells compatible

2021-03-28 Thread Miquel Raynal
On Fri, 2021-03-12 at 06:28:21 UTC, Ansuel Smith wrote: > Document nvmem-cells compatible used to treat mtd partitions as a > nvmem provider. > > Signed-off-by: Ansuel Smith > Reviewed-by: Rob Herring Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. M

Re: [PATCH] include: linux: mtd: Remove duplicate include of nand.h

2021-03-28 Thread Miquel Raynal
On Tue, 2021-03-23 at 03:17:37 UTC, Wan Jiabing wrote: > linux/mtd/nand.h has been included at line 17. > So we remove the duplicate one at line 21. > > Signed-off-by: Wan Jiabing Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel

Re: [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter

2021-03-28 Thread Miquel Raynal
On Mon, 2021-03-22 at 15:07:14 UTC, Tudor Ambarus wrote: > From: "Kai Stuhlemmer (ebee Engineering)" > > Update MTD ECC statistics with the number of corrected bits. > > Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") > Cc: sta...@vger.kernel.org > Signed-off-by: Kai Stuh

Re: [PATCH 1/2] mtd: rawnand: brcmnand: read/write oob during EDU transfer

2021-03-28 Thread Miquel Raynal
On Thu, 2021-03-11 at 17:09:08 UTC, Kamal Dasu wrote: > Added support to read/write oob during EDU transfers. > > Signed-off-by: Kamal Dasu Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel

Re: [PATCH 2/2] mtd: rawnand: brcmnand: move to polling in pio mode on oops write

2021-03-28 Thread Miquel Raynal
On Thu, 2021-03-11 at 17:09:09 UTC, Kamal Dasu wrote: > This change makes sure that Broadcom NAND driver moves to interrupt > polling on the first brcmnand_write() call. > > Signed-off-by: Kamal Dasu Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Mi

Re: [PATCH] mtd:rawnand: remove duplicate include in rawnand.h

2021-03-28 Thread Miquel Raynal
On Sat, 2021-03-13 at 10:57:02 UTC, menglong8.d...@gmail.com wrote: > From: Zhang Yunkai > > 'linux/mtd/nand.h' included in 'rawnand.h' is duplicated. > It is also included in the 17th line. > > Signed-off-by: Zhang Yunkai Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.gi

Re: [PATCH -next] mtd: rawnand: rockchip: Use flexible-array member instead of zero-length array

2021-03-28 Thread Miquel Raynal
On Tue, 2021-03-23 at 13:11:37 UTC, Zou Wei wrote: > Suppresses the following coccinelle warning: > > drivers/mtd/nand/raw/rockchip-nand-controller.c:162:4-8: WARNING use > flexible-array member instead > > Signed-off-by: Zou Wei Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH v2 mtd/fixes] mtd: spinand: core: add missing MODULE_DEVICE_TABLE()

2021-03-28 Thread Miquel Raynal
On Tue, 2021-03-23 at 17:37:19 UTC, Alexander Lobakin wrote: > The module misses MODULE_DEVICE_TABLE() for both SPI and OF ID tables > and thus never autoloads on ID matches. > Add the missing declarations. > Present since day-0 of spinand framework introduction. > > Fixes: 7529df465248 ("mtd: nan

Re: [PATCH v8 3/3] mtd: rawnand: Add support for secure regions in NAND memory

2021-03-23 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Tue, 23 Mar 2021 13:09:30 +0530: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like

Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2

2021-03-23 Thread Miquel Raynal
Hi Daniel, Daniel Palmer wrote on Tue, 23 Mar 2021 20:47:10 +0900: > Hi Miquel, > > On Tue, 23 Mar 2021 at 19:32, Miquel Raynal wrote: > > You can run nandbiterrs -i /dev/mtdX > > > > You'll see if there is ECC correction or not (and its level). > > T

Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2

2021-03-23 Thread Miquel Raynal
Hi Daniel, Daniel Palmer wrote on Tue, 23 Mar 2021 18:33:54 +0900: > Hi Miquel, > > On Tue, 23 Mar 2021 at 03:32, Miquel Raynal wrote: > > > I think this shows that the datasheet is right in that the complete 64 > > > bytes of "spare area" is usable. >

Re: [PATCH v2] mtd: spinand: add support for Foresee FS35ND01G-S1Y2

2021-03-22 Thread Miquel Raynal
Hi Daniel, Daniel Palmer wrote on Mon, 22 Mar 2021 21:44:40 +0900: > Hi Miquel, > > Sorry for the resend. Gmail randomly switched to HTML email so the > original version seems to have bounced. > > On Mon, 15 Feb 2021 at 20:16, Miquel Raynal wrote: > > > "2

Re: [PATCH v1] mtd: nand: Fix BBT update issue

2021-03-19 Thread Miquel Raynal
Hi Yoshio, + Patrick Yoshio Furuyama wrote on Tue, 16 Feb 2021 09:37:55 +0900: > Fixed issue of manages BBT (Bad Block Table). > It didn't mark correctly when a specific block was bad block. > > This issue occurs when the bad block mark (3-bit chunk) is > crosses over 32 bit (e.g. Block10, Bl

Re: [PATCH v5 0/3] Add support for secure regions in NAND

2021-03-17 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Wed, 17 Mar 2021 17:55:10 +0530: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like

Re: [PATCH] dt-bindings: i3c: Fix silvaco,i3c-master-v1 compatible string

2021-03-11 Thread Miquel Raynal
Rob Herring wrote on Thu, 11 Mar 2021 16:40:56 -0700: > The example for the Silvaco I3C master doesn't match the schema's > compatible string. Fix it. > > Cc: Miquel Raynal > Cc: Conor Culhane > Cc: Alexandre Belloni > Cc: linux-...@lists.infradead.o

Re: [PATCH -next] mtd: parsers: ofpart: make symbol 'bcm4908_partitions_quirks' static

2021-03-11 Thread Miquel Raynal
On Thu, 2021-03-04 at 06:46:00 UTC, 'Wei Yongjun wrote: > From: Wei Yongjun > > The sparse tool complains as follows: > > drivers/mtd/parsers/ofpart_core.c:25:32: warning: > symbol 'bcm4908_partitions_quirks' was not declared. Should it be static? > > This symbol is not used outside of ofpart_

Re: [PATCH RESEND][next] mtd: onenand: Fix fall-through warnings for Clang

2021-03-11 Thread Miquel Raynal
On Fri, 2021-03-05 at 08:23:56 UTC, "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the next case. > > Link: https://github.com/KSPP/linux/issues/115 > Sig

Re: [PATCH RESEND][next] mtd: rawnand: fsmc: Fix fall-through warnings for Clang

2021-03-11 Thread Miquel Raynal
On Fri, 2021-03-05 at 08:25:59 UTC, "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the next case. > > Link: https://github.com/KSPP/linux/issues/115 > Sig

Re: [PATCH] mtd: maps: fix error return code of physmap_flash_remove()

2021-03-11 Thread Miquel Raynal
On Mon, 2021-03-08 at 03:44:46 UTC, Jia-Ju Bai wrote: > When platform_get_drvdata() returns NULL to info, no error return code > of physmap_flash_remove() is assigned. > To fix this bug, err is assigned with -EINVAL in this case > > Fixes: 73566edf9b91 ("[MTD] Convert physmap to platform driver")

Re: [PATCH RESEND][next] mtd: cfi: Fix fall-through warnings for Clang

2021-03-11 Thread Miquel Raynal
On Fri, 2021-03-05 at 08:19:33 UTC, "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements and a return > instead of letting the code fall through to the next case. > > Link: https://github.co

Re: [PATCH RESEND][next] mtd: mtdchar: Fix fall-through warnings for Clang

2021-03-11 Thread Miquel Raynal
On Fri, 2021-03-05 at 08:22:24 UTC, "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the next case. > > Link: https://github.com/KSPP/linux/issues/115 > Sig

Re: [PATCH v3][next] mtd: rawnand: stm32_fmc2: Fix fall-through warnings for Clang

2021-03-11 Thread Miquel Raynal
On Fri, 2021-03-05 at 08:29:53 UTC, "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding a couple of break statements instead > of letting the code fall through to the next case. > > Link: https://github.com/KSPP/

Re: [PATCH next v4 02/15] mtd: mtdoops: synchronize kmsg_dumper

2021-03-11 Thread Miquel Raynal
example, mtd_write() expects to be called in a non-atomic > context and may take a mutex. > > Signed-off-by: John Ogness > Reviewed-by: Petr Mladek Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: drivers/mtd/parsers/qcomsmempart.c:109 parse_qcomsmem_part() warn: passing zero to 'PTR_ERR'

2021-03-03 Thread Miquel Raynal
Hello, Dan Carpenter wrote on Wed, 3 Mar 2021 08:49:18 +0300: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 7a7fd0de4a9804299793e564a555a49c1fc924cb > commit: 803eb124e1a64e42888542c3444bfe6dac412c7f mtd: parsers: Add Qcom SMEM > parser > confi

Re: [PATCH][next] mtd: nand: Fix error handling in nand_prog_page_op

2021-03-03 Thread Miquel Raynal
Hi Colin, Colin King wrote on Wed, 3 Mar 2021 09:42:46 +: > From: Colin Ian King > > The less than zero comparison with status is always false because status > is a u8. Fix this by using ret as the return check for the call to > chip->legacy.waitfunc() and checking on this and assigning s

Re: [PATCH 0/2] Handle probe defer properly in MTD core

2021-03-03 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Tue, 2 Mar 2021 18:57:55 +0530: > Hello, > > These two patches aims at fixing the -EPROBE_DEFER handling in the MTD > core and also in the Qcom nand driver. The "qcomsmem" parser depends on > the QCOM_SMEM driver to parse the partitions defined in t

Re: [PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:54 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH 4/5] mtd: rawnand: qcom: Add helper to configure location register

2021-03-02 Thread Miquel Raynal
On Tue, 2021-02-23 at 19:39:00 UTC, Md Sadre Alam wrote: > Create a nandc_set_read_loc() helper to abstract the > configuration of the location register. > > QPIC v2 onwards features a separate location register > for the last codeword, so introducing this extra helper > which will simplify the ad

Re: [PATCH] mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()

2021-03-02 Thread Miquel Raynal
On Mon, 2021-02-15 at 15:58:49 UTC, Dan Carpenter wrote: > If dma_request_channel() fails then the probe fails and it should > return a negative error code, but currently it returns success. > > fixes: 4774fb0a48aa ("mtd: nand/fsmc: Add DMA support") > Signed-off-by: Dan Carpenter Applied to htt

Re: [PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:53 UTC, Dejin Zheng wrote: > This patch introduces the module_mtd_blktrans macro which is a convenience > macro for mtd blktrans modules similar to module_platform_driver. > It is intended to be used by drivers which init/exit section does nothing > but register/unregist

Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-03-02 Thread Miquel Raynal
On Fri, 2021-02-12 at 10:40:22 UTC, "Gustavo A. R. Silva" wrote: > Cast &data to (char *) in order to avoid unintentionally accessing > the stack. > > Notice that data is of type u32, so any increment to &data > will be in the order of 4-byte chunks, and this piece of code > is actually intended t

Re: [PATCH] mtd: mtdcore: constify name param in mtd_bdi_init

2021-03-02 Thread Miquel Raynal
On Thu, 2021-02-25 at 14:33:29 UTC, Tomas Winkler wrote: > The bdi name is not modified by the function, it should be const. > > Signed-off-by: Tomas Winkler Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel

Re: [PATCH 2/2] mtd: char: Get rid of Big MTD Lock

2021-03-02 Thread Miquel Raynal
On Wed, 2021-02-17 at 21:18:45 UTC, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Get rid of central chrdev MTD lock, which prevents simultaneous operations > on completely independent physical MTD chips. Replace it with newly > introduced per-master mutex. > > Signed-off-by: Alexan

Re: [PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:55 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:58 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:56 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:59 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:46:00 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver

2021-03-02 Thread Miquel Raynal
On Sat, 2021-02-13 at 16:45:57 UTC, Dejin Zheng wrote: > Removing some boilerplate by using module_mtd_blktrans instead of calling > register and unregister in the otherwise empty init/exit functions. > > Signed-off-by: Dejin Zheng Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/l

Re: [PATCH 1/2] mtd: char: Drop mtd_mutex usage from mtdchar_open()

2021-03-02 Thread Miquel Raynal
On Wed, 2021-02-17 at 21:18:44 UTC, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > It looks unnecessary in the function, remove it from the function > having in mind to remove it completely. > > Signed-off-by: Alexander Sverdlin Applied to https://git.kernel.org/pub/scm/linux/kerne

Re: [PATCH v2 8/9] mtd/drivers/nand: Use HZ macros

2021-03-02 Thread Miquel Raynal
Hi Daniel, Daniel Lezcano wrote on Tue, 2 Mar 2021 18:03:12 +0100: > On 02/03/2021 17:31, Miquel Raynal wrote: > > On Wed, 2021-02-24 at 14:42:18 UTC, Daniel Lezcano wrote: > >> HZ unit conversion macros are available in units.h, use them and > >> remo

Re: [PATCH v2 8/9] mtd/drivers/nand: Use HZ macros

2021-03-02 Thread Miquel Raynal
On Wed, 2021-02-24 at 14:42:18 UTC, Daniel Lezcano wrote: > HZ unit conversion macros are available in units.h, use them and > remove the duplicate definition. > > Signed-off-by: Daniel Lezcano Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel

Re: [PATCH v2] nand: brcmnand: fix OOB R/W with Hamming ECC

2021-03-02 Thread Miquel Raynal
On Wed, 2021-02-24 at 08:02:10 UTC, =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= wrote: > Hamming ECC doesn't cover the OOB data, so reading or writing OOB shall > always be done without ECC enabled. > This is a problem when adding JFFS2 cleanmarkers to erased blocks. If JFFS2 > clenmarkers are ad

Re: [PATCH] mtd: rawnand: qcom: Update register macro name for 0x2c offset

2021-03-02 Thread Miquel Raynal
On Sat, 2021-01-30 at 20:07:16 UTC, Md Sadre Alam wrote: > This change will remove unused register name macro NAND_DEV1_ECC_CFG. > Since this register was only available in QPIC version 1.4.20 ipq40xx > and it was not used. In QPIC version 1.5 on wards this register got > removed.In QPIC version 2.

Re: [PATCH 3/5] mtd: rawnand: qcom: Rename parameter name in macro

2021-03-02 Thread Miquel Raynal
On Tue, 2021-02-23 at 19:38:59 UTC, Md Sadre Alam wrote: > Rename the parameters of the nandc_set_read_loc() macro > to avoid the confusion between is_last_read_loc which > is last location in a read code word and last_cw which > is last code word of a page data. > > Signed-off-by: Md Sadre Alam

Re: [PATCH 2/5] mtd: rawnand: qcom: Add helper to check last code word

2021-03-02 Thread Miquel Raynal
On Tue, 2021-02-23 at 19:38:58 UTC, Md Sadre Alam wrote: > Add the qcom_nandc_is_last_cw() helper which checks if > the input cw index is the last one or not. > > Signed-off-by: Md Sadre Alam Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel

Re: [PATCH 1/5] mtd: rawnand: qcom: Convert nandc to chip in Read/Write helper

2021-03-02 Thread Miquel Raynal
On Tue, 2021-02-23 at 19:38:57 UTC, Md Sadre Alam wrote: > This change will convert nandc to chip in Read/Write helper, this > change is needed because if we wnated to access number of steps > in Read/Write helper then we need to get the chip->ecc.steps, > currentlly its not possible.After this cha

Re: [PATCH][next] i3c: master: svc: remove redundant assignment to cmd->read_len

2021-03-02 Thread Miquel Raynal
t > svc_i3c_master *master, > cmd->in = NULL; > cmd->out = &ccc->id; > cmd->len = 1; > - cmd->read_len = xfer_len; > cmd->read_len = 0; > cmd->continued = true; > Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [RFC PATCH] mtd: add OTP (one-time-programmable) erase ioctl

2021-03-02 Thread Miquel Raynal
Hi Michael, Michael Walle wrote on Tue, 2 Mar 2021 12:09:27 +0100: > This may sound like a contradiction but some SPI-NOR flashes really > support erasing their OTP region until it is finally locked. Having the > possibility to erase an OTP region might come in handy during > development. > >

Re: [PATCH v2] nand: brcmnand: fix OOB R/W with Hamming ECC

2021-02-25 Thread Miquel Raynal
Hi Álvaro, Álvaro Fernández Rojas wrote on Thu, 25 Feb 2021 08:54:09 +0100: > Hi Miquel, > > > El 25 feb 2021, a las 8:48, Miquel Raynal > > escribió: > > > > Hi Álvaro, > > > > Brian Norris wrote on Wed, 24 Feb 2021 > > 13:01:13 -0800: >

Re: [PATCH v2] nand: brcmnand: fix OOB R/W with Hamming ECC

2021-02-24 Thread Miquel Raynal
Hi Álvaro, Brian Norris wrote on Wed, 24 Feb 2021 13:01:13 -0800: > On Wed, Feb 24, 2021 at 12:02 AM Álvaro Fernández Rojas > wrote: > > Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB > > NAND controller") > > FWIW, I could believe this was broken. We weren't te

Re: [PATCH v2 3/3] mtd: rawnand: qcom: Add support for secure regions in NAND memory

2021-02-24 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Thu, 25 Feb 2021 09:41:29 +0530: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like

Re: [PATCH] mtd: rawnand: qcom: update last code word register

2021-02-24 Thread Miquel Raynal
Hello, mda...@codeaurora.org wrote on Wed, 24 Feb 2021 22:00:05 +0530: > On 2021-02-24 12:18, Miquel Raynal wrote: > > Hello, > > > > mda...@codeaurora.org wrote on Wed, 24 Feb 2021 10:09:48 +0530: > > > >> On 2021-02-24 01:13, mda...@codeaurora.org

Re: [PATCH] nand: brcmnand: fix OOB R/W with Hamming ECC

2021-02-23 Thread Miquel Raynal
Hi Álvaro, Álvaro Fernández Rojas wrote on Wed, 24 Feb 2021 08:16:58 +0100: > Hi Florian, > > > El 24 feb 2021, a las 4:46, Florian Fainelli > > escribió: > > > > > > > > On 2/22/2021 12:16 PM, Álvaro Fernández Rojas wrote: > >> Hamming ECC doesn't cover the OOB data, so reading or writing

Re: [PATCH] mtd: rawnand: qcom: update last code word register

2021-02-23 Thread Miquel Raynal
Hello, mda...@codeaurora.org wrote on Wed, 24 Feb 2021 10:09:48 +0530: > On 2021-02-24 01:13, mda...@codeaurora.org wrote: > > On 2021-02-23 22:04, Miquel Raynal wrote: > >> Hello, > >> >> Md Sadre Alam wrote on Tue, 23 Feb 2021 > >> 01:34:

Re: [PATCH 2/3] dt-bindings: mtd: Add a property to declare secure regions in Qcom NANDc

2021-02-23 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Tue, 23 Feb 2021 23:15:46 +0530: > Hi Miquel, > > On Tue, Feb 23, 2021 at 05:49:22PM +0100, Miquel Raynal wrote: > > Hi Manivannan, > > > > Manivannan Sadhasivam wrote on Mon, > > 22 Feb 2021 17:32:58 +0530: >

Re: [PATCH 2/3] dt-bindings: mtd: Add a property to declare secure regions in Qcom NANDc

2021-02-23 Thread Miquel Raynal
Hi Manivannan, Manivannan Sadhasivam wrote on Mon, 22 Feb 2021 17:32:58 +0530: > On a typical end product, a vendor may choose to secure some regions in > the NAND memory which are supposed to stay intact between FW upgrades. > The access to those regions will be blocked by a secure element like

Re: [PATCH] mtd: rawnand: qcom: update last code word register

2021-02-23 Thread Miquel Raynal
Hello, Md Sadre Alam wrote on Tue, 23 Feb 2021 01:34:27 +0530: > From QPIC version 2.0 onwards new register got added to read last a new > codeword. This change will add the READ_LOCATION_LAST_CW_n register. Add support for this READ_LOCATION_LAST_CW

Re: [PATCH] mtd: rawnand: qcom: Add helper to configure location register

2021-02-23 Thread Miquel Raynal
Hello, Md Sadre Alam wrote on Mon, 22 Feb 2021 20:35:43 +0530: > This change will add helper nandc_set_read_loc() to configure > location register value. QPIC V2 on wards there is separate > location register to read the last code word. This helper > will use to configure location register for l

Re: [PATCH] mtd: rawnand: qcom: Rename parameter name in macro

2021-02-23 Thread Miquel Raynal
Hello, Md Sadre Alam wrote on Mon, 22 Feb 2021 13:05:42 +0530: > This change will rename parameter name in macro > nandc_set_read_loc().renamed parameter names are > cw_offset, read_size, is_last_read_loc. > Sinc in QPIC V2 on-wards there is separate location > register to read last code word, s

Re: [PATCH] mtd: rawnand: qcom: Add helper to check last code word

2021-02-23 Thread Miquel Raynal
Hello, Md Sadre Alam wrote on Mon, 22 Feb 2021 11:54:55 +0530: > This change will add helper qcom_nandc_is_last_cw() Use the imperative form, something like: " Add the qcom_nandc_is_last_cw() helper which checks if the input cw index is the last one or not. " > which will check for last code

Re: [PATCH] mtd: rawnand: qcom: Convert nandc to chip in Read/Write helper

2021-02-23 Thread Miquel Raynal
Hello, Md Sadre Alam wrote on Mon, 22 Feb 2021 01:55:01 +0530: > This change will convert nandc to chip in Read/Write helper, this > change is needed because if we wnated to access number of steps > in Read/Write helper then we need to get the chip->ecc.steps, > currentlly its not possible.After

  1   2   3   4   5   6   7   8   9   10   >