* [PATCH v2] mtd: rawnand: marvell: fix layouts
@ 2024-02-05 13:44 Elad Nachman
2024-02-05 15:17 ` Miquel Raynal
0 siblings, 1 reply; 4+ messages in thread
From: Elad Nachman @ 2024-02-05 13:44 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, vadym.kochan, aviramd,
linux-mtd, linux-kernel
Cc: enachman, stable
From: Elad Nachman <enachman@marvell.com>
The check in nand_base.c, nand_scan_tail() : has the following code:
(ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
Remove ECC entries in this driver which are not integral multiplications,
and adjust the number of chunks for entries which fails the above
calculation so it will calculate correctly (this was previously done
automatically before the check and was removed in a later commit).
Fixes: 68c18dae6888 ("mtd: rawnand: marvell: add missing layouts")
Cc: stable@vger.kernel.org
Signed-off-by: Elad Nachman <enachman@marvell.com>
---
drivers/mtd/nand/raw/marvell_nand.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index a46698744850..5b0f5a9cef81 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -290,16 +290,13 @@ static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
MARVELL_LAYOUT( 2048, 512, 4, 1, 1, 2048, 32, 30, 0, 0, 0),
MARVELL_LAYOUT( 2048, 512, 8, 2, 1, 1024, 0, 30,1024,32, 30),
MARVELL_LAYOUT( 2048, 512, 8, 2, 1, 1024, 0, 30,1024,64, 30),
- MARVELL_LAYOUT( 2048, 512, 12, 3, 2, 704, 0, 30,640, 0, 30),
- MARVELL_LAYOUT( 2048, 512, 16, 5, 4, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 2048, 512, 16, 4, 4, 512, 0, 30, 0, 32, 30),
MARVELL_LAYOUT( 4096, 512, 4, 2, 2, 2048, 32, 30, 0, 0, 0),
- MARVELL_LAYOUT( 4096, 512, 8, 5, 4, 1024, 0, 30, 0, 64, 30),
- MARVELL_LAYOUT( 4096, 512, 12, 6, 5, 704, 0, 30,576, 32, 30),
- MARVELL_LAYOUT( 4096, 512, 16, 9, 8, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 4096, 512, 8, 4, 4, 1024, 0, 30, 0, 64, 30),
+ MARVELL_LAYOUT( 4096, 512, 16, 8, 8, 512, 0, 30, 0, 32, 30),
MARVELL_LAYOUT( 8192, 512, 4, 4, 4, 2048, 0, 30, 0, 0, 0),
- MARVELL_LAYOUT( 8192, 512, 8, 9, 8, 1024, 0, 30, 0, 160, 30),
- MARVELL_LAYOUT( 8192, 512, 12, 12, 11, 704, 0, 30,448, 64, 30),
- MARVELL_LAYOUT( 8192, 512, 16, 17, 16, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 8192, 512, 8, 8, 8, 1024, 0, 30, 0, 160, 30),
+ MARVELL_LAYOUT( 8192, 512, 16, 16, 16, 512, 0, 30, 0, 32, 30),
};
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] mtd: rawnand: marvell: fix layouts
2024-02-05 13:44 [PATCH v2] mtd: rawnand: marvell: fix layouts Elad Nachman
@ 2024-02-05 15:17 ` Miquel Raynal
0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2024-02-05 15:17 UTC (permalink / raw)
To: Elad Nachman
Cc: richard, vigneshr, vadym.kochan, aviramd, linux-mtd, linux-kernel,
stable
Hi Elad,
enachman@marvell.com wrote on Mon, 5 Feb 2024 15:44:35 +0200:
> From: Elad Nachman <enachman@marvell.com>
>
> The check in nand_base.c, nand_scan_tail() : has the following code:
> (ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
> Remove ECC entries in this driver which are not integral multiplications,
> and adjust the number of chunks for entries which fails the above
> calculation so it will calculate correctly (this was previously done
> automatically before the check and was removed in a later commit).
I don't know why linux-mtd does not collect your patches, for this time
I applied it manually to mtd/fixes.
See, linux-mtd lore link is broken, but linux-stable collected
correctly:
https://lore.kernel.org/linux-mtd/20240205134435.2769452-1-enachman@marvell.com/
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] mtd: rawnand: marvell: fix layouts
@ 2024-01-03 13:37 Elad Nachman
2024-02-05 12:47 ` Miquel Raynal
0 siblings, 1 reply; 4+ messages in thread
From: Elad Nachman @ 2024-01-03 13:37 UTC (permalink / raw)
To: miquel.raynal, richard, vigneshr, vadym.kochan, aviramd,
linux-mtd, linux-kernel
Cc: enachman, stable
From: Elad Nachman <enachman@marvell.com>
The check in nand_base.c, nand_scan_tail() : has the following code:
(ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
Remove ECC entries in this driver which are not integral multiplications,
and adjust the number of chunks for entries which fails the above
calculation so it will calculate correctly (this was previously done
automatically before the check and was removed in a later commit).
Fixes: 68c18dae6888 ("mtd: rawnand: marvell: add missing layouts")
Cc: stable@vger.kernel.org
Signed-off-by: Elad Nachman <enachman@marvell.com>
---
drivers/mtd/nand/raw/marvell_nand.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index a46698744850..5b0f5a9cef81 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -290,16 +290,13 @@ static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
MARVELL_LAYOUT( 2048, 512, 4, 1, 1, 2048, 32, 30, 0, 0, 0),
MARVELL_LAYOUT( 2048, 512, 8, 2, 1, 1024, 0, 30,1024,32, 30),
MARVELL_LAYOUT( 2048, 512, 8, 2, 1, 1024, 0, 30,1024,64, 30),
- MARVELL_LAYOUT( 2048, 512, 12, 3, 2, 704, 0, 30,640, 0, 30),
- MARVELL_LAYOUT( 2048, 512, 16, 5, 4, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 2048, 512, 16, 4, 4, 512, 0, 30, 0, 32, 30),
MARVELL_LAYOUT( 4096, 512, 4, 2, 2, 2048, 32, 30, 0, 0, 0),
- MARVELL_LAYOUT( 4096, 512, 8, 5, 4, 1024, 0, 30, 0, 64, 30),
- MARVELL_LAYOUT( 4096, 512, 12, 6, 5, 704, 0, 30,576, 32, 30),
- MARVELL_LAYOUT( 4096, 512, 16, 9, 8, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 4096, 512, 8, 4, 4, 1024, 0, 30, 0, 64, 30),
+ MARVELL_LAYOUT( 4096, 512, 16, 8, 8, 512, 0, 30, 0, 32, 30),
MARVELL_LAYOUT( 8192, 512, 4, 4, 4, 2048, 0, 30, 0, 0, 0),
- MARVELL_LAYOUT( 8192, 512, 8, 9, 8, 1024, 0, 30, 0, 160, 30),
- MARVELL_LAYOUT( 8192, 512, 12, 12, 11, 704, 0, 30,448, 64, 30),
- MARVELL_LAYOUT( 8192, 512, 16, 17, 16, 512, 0, 30, 0, 32, 30),
+ MARVELL_LAYOUT( 8192, 512, 8, 8, 8, 1024, 0, 30, 0, 160, 30),
+ MARVELL_LAYOUT( 8192, 512, 16, 16, 16, 512, 0, 30, 0, 32, 30),
};
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] mtd: rawnand: marvell: fix layouts
2024-01-03 13:37 Elad Nachman
@ 2024-02-05 12:47 ` Miquel Raynal
0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2024-02-05 12:47 UTC (permalink / raw)
To: Elad Nachman
Cc: richard, vigneshr, vadym.kochan, aviramd, linux-mtd, linux-kernel,
stable
Hi Elad,
enachman@marvell.com wrote on Wed, 3 Jan 2024 15:37:40 +0200:
> From: Elad Nachman <enachman@marvell.com>
>
> The check in nand_base.c, nand_scan_tail() : has the following code:
> (ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
> Remove ECC entries in this driver which are not integral multiplications,
> and adjust the number of chunks for entries which fails the above
> calculation so it will calculate correctly (this was previously done
> automatically before the check and was removed in a later commit).
>
> Fixes: 68c18dae6888 ("mtd: rawnand: marvell: add missing layouts")
> Cc: stable@vger.kernel.org
> Signed-off-by: Elad Nachman <enachman@marvell.com>
For some reasons, your patch reached the lkml but not
linux-mtd... At least it does not appear on lore nor
patchwork. Can you please resend?
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-05 15:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 13:44 [PATCH v2] mtd: rawnand: marvell: fix layouts Elad Nachman
2024-02-05 15:17 ` Miquel Raynal
-- strict thread matches above, loose matches on Subject: below --
2024-01-03 13:37 Elad Nachman
2024-02-05 12:47 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox