[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210125183216.354355440@linuxfoundation.org>
Date: Mon, 25 Jan 2021 19:37:04 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Martin Hundebøll <martin@...nix.com>,
Sean Nyekjaer <sean@...nix.com>,
Miquel Raynal <miquel.raynal@...tlin.com>
Subject: [PATCH 5.10 002/199] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
From: Sean Nyekjaer <sean@...nix.com>
commit 4883a60c17eda6bf52d1c817ee7ead65b4a02da2 upstream.
Re-add the multiply by 8 to "step * eccsize" to correct the destination bit offset
when extracting the data payload in gpmi_ecc_read_page_raw().
Fixes: e5e5631cc889 ("mtd: rawnand: gpmi: Use nand_extract_bits()")
Cc: stable@...r.kernel.org
Reported-by: Martin Hundebøll <martin@...nix.com>
Signed-off-by: Sean Nyekjaer <sean@...nix.com>
Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
Link: https://lore.kernel.org/linux-mtd/20201221100013.2715675-1-sean@geanix.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -1613,7 +1613,7 @@ static int gpmi_ecc_read_page_raw(struct
/* Extract interleaved payload data and ECC bits */
for (step = 0; step < nfc_geo->ecc_chunk_count; step++) {
if (buf)
- nand_extract_bits(buf, step * eccsize, tmp_buf,
+ nand_extract_bits(buf, step * eccsize * 8, tmp_buf,
src_bit_off, eccsize * 8);
src_bit_off += eccsize * 8;
Powered by blists - more mailing lists