mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
PATCH 1/1 mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
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().
--- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +1 -1
@@ -1611,7 +1611,7 @@ static int gpmi_ecc_read_page_raw(struct nand_chip *chip, uint8_t *buf,/* 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 ;
Signature · 1 line
2.29.2
Quoted 7 lines · Sean Nyekjaer
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()")Reported-by Martin Hundebøll <[email protected]>Signed-off-by Sean Nyekjaer <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Quoted 11 lines · Miquel Raynal
Quoted 7 lines · Sean Nyekjaer
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()")Reported-by Martin Hundebøll <[email protected]>Signed-off-by Sean Nyekjaer <[email protected]>Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Hi Miquel
Will you please queue this for fixes? It's quite relevant for 5.10 LTS :)
Best regards
Sean Nyekjaer
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Miquel Raynal
maintainerHi Sean,
Sean Nyekjaer <[email protected]> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
Quoted 9 lines · Miquel Raynal
Quoted 8 lines · Sean Nyekjaer
Quoted 7 lines
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()")Reported-by Martin Hundebøll <[email protected]>Signed-off-by Sean Nyekjaer <[email protected]>
Quoted 6 lines
Quoted 3 lines
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Hi Miquel
Will you please queue this for fixes? It's quite relevant for 5.10 LTS :)
Right, that will be quicker to have it in Linus' tree. I moved the patch to the mtd/next branch.
Cheers,
Miquèl
Quoted 13 lines · Miquel Raynal
Hi Sean,
Sean Nyekjaer <[email protected]> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
Quoted 9 lines · Miquel Raynal
Quoted 8 lines · Sean Nyekjaer
Quoted 7 lines
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()")Reported-by Martin Hundebøll <[email protected]>Signed-off-by Sean Nyekjaer <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Hi Miquel
Will you please queue this for fixes? It's quite relevant for 5.10 LTS :)
Right, that will be quicker to have it in Linus' tree. I moved the patch to the mtd/next branch.
Hi Miquel,
Any guess to when the mtd/fixes branch will be pulled into Linus' tree?
/Sean
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Miquel Raynal
maintainerHi Sean,
Sean Nyekjaer <[email protected]> wrote on Mon, 18 Jan 2021 12:07:01 +0100:
Quoted 20 lines · Miquel Raynal
Quoted 19 lines
Hi Sean,
Sean Nyekjaer <[email protected]> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
Quoted 15 lines · Miquel Raynal
Quoted 11 lines · Sean Nyekjaer
Quoted 7 lines
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()")Reported-by Martin Hundebøll <[email protected]>Signed-off-by Sean Nyekjaer <[email protected]>Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Hi Miquel
Will you please queue this for fixes? It's quite relevant for 5.10 LTS :)
Quoted 8 lines
Quoted 3 lines
Right, that will be quicker to have it in Linus' tree. I moved the patch to the mtd/next branch.
Hi Miquel,
Any guess to when the mtd/fixes branch will be pulled into Linus' tree?
/Sean
It should be in linux-next already, I hope to collect an other important fix this week before requesting a merge of the mtd/fixes branch for the next -rc.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/