From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org,
Vignesh Raghavendra <vigneshr@ti.com>,
stable@vger.kernel.org,
Tudor Ambarus <Tudor.Ambarus@microchip.com>
Subject: Re: [PATCH resend] mtd: spinand: Propagate ECC information to the MTD structure
Date: Wed, 13 May 2020 18:09:43 +0200 [thread overview]
Message-ID: <20200513180943.63efe337@collabora.com> (raw)
In-Reply-To: <20200513131029.15603-1-miquel.raynal@bootlin.com>
On Wed, 13 May 2020 15:10:29 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> This is done by default in the raw NAND core (nand_base.c) but was
> missing in the SPI-NAND core. Without these two lines the ecc_strength
> and ecc_step_size values are not exported to the user through sysfs.
>
> This fix depends on recent changes and should not be backported as-is.
>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>
> This patch is extracted from a bigger series and needs to be merged
> now as a fix. I haven't changed anything from it's original
> submission.
>
> drivers/mtd/nand/spi/core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index b6bb358b96ce..248c4d7a0cf4 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -1089,6 +1089,10 @@ static int spinand_init(struct spinand_device *spinand)
>
> mtd->oobavail = ret;
>
> + /* Propagate ECC information to mtd_info */
> + mtd->ecc_strength = nand->ecc.ctx.conf.strength;
> + mtd->ecc_step_size = nand->ecc.ctx.conf.step_size;
> +
> return 0;
>
> err_cleanup_nanddev:
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
<linux-mtd@lists.infradead.org>,
stable@vger.kernel.org
Subject: Re: [PATCH resend] mtd: spinand: Propagate ECC information to the MTD structure
Date: Wed, 13 May 2020 18:09:43 +0200 [thread overview]
Message-ID: <20200513180943.63efe337@collabora.com> (raw)
In-Reply-To: <20200513131029.15603-1-miquel.raynal@bootlin.com>
On Wed, 13 May 2020 15:10:29 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> This is done by default in the raw NAND core (nand_base.c) but was
> missing in the SPI-NAND core. Without these two lines the ecc_strength
> and ecc_step_size values are not exported to the user through sysfs.
>
> This fix depends on recent changes and should not be backported as-is.
>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>
> This patch is extracted from a bigger series and needs to be merged
> now as a fix. I haven't changed anything from it's original
> submission.
>
> drivers/mtd/nand/spi/core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index b6bb358b96ce..248c4d7a0cf4 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -1089,6 +1089,10 @@ static int spinand_init(struct spinand_device *spinand)
>
> mtd->oobavail = ret;
>
> + /* Propagate ECC information to mtd_info */
> + mtd->ecc_strength = nand->ecc.ctx.conf.strength;
> + mtd->ecc_step_size = nand->ecc.ctx.conf.step_size;
> +
> return 0;
>
> err_cleanup_nanddev:
next prev parent reply other threads:[~2020-05-13 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 13:10 [PATCH resend] mtd: spinand: Propagate ECC information to the MTD structure Miquel Raynal
2020-05-13 13:10 ` Miquel Raynal
2020-05-13 16:09 ` Boris Brezillon [this message]
2020-05-13 16:09 ` Boris Brezillon
2020-05-17 21:28 ` Richard Weinberger
2020-05-17 21:28 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513180943.63efe337@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.