* [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
@ 2020-12-21 10:00 Sean Nyekjaer
2021-01-04 10:35 ` Miquel Raynal
0 siblings, 1 reply; 6+ messages in thread
From: Sean Nyekjaer @ 2020-12-21 10:00 UTC (permalink / raw)
To: Han Xu, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
Cc: Sean Nyekjaer, stable, Martin Hundebøll, linux-mtd, linux-kernel
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@vger.kernel.org
Reported-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index dc8104e67506..f0726e69a312 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -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;
--
2.29.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
2020-12-21 10:00 [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload Sean Nyekjaer
@ 2021-01-04 10:35 ` Miquel Raynal
2021-01-04 10:50 ` Sean Nyekjaer
0 siblings, 1 reply; 6+ messages in thread
From: Miquel Raynal @ 2021-01-04 10:35 UTC (permalink / raw)
To: Sean Nyekjaer, Han Xu, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra
Cc: Martin Hundebøll, linux-mtd, linux-kernel, stable
On Mon, 2020-12-21 at 10:00:13 UTC, Sean Nyekjaer wrote:
> 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@vger.kernel.org
> Reported-by: Martin Hundebøll <martin@geanix.com>
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
2021-01-04 10:35 ` Miquel Raynal
@ 2021-01-04 10:50 ` Sean Nyekjaer
2021-01-04 11:15 ` Miquel Raynal
0 siblings, 1 reply; 6+ messages in thread
From: Sean Nyekjaer @ 2021-01-04 10:50 UTC (permalink / raw)
To: Miquel Raynal, Han Xu, Richard Weinberger, Vignesh Raghavendra
Cc: Martin Hundebøll, linux-mtd, linux-kernel, stable
On 04/01/2021 11.35, Miquel Raynal wrote:
> On Mon, 2020-12-21 at 10:00:13 UTC, Sean Nyekjaer wrote:
>> 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@vger.kernel.org
>> Reported-by: Martin Hundebøll <martin@geanix.com>
>> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
2021-01-04 10:50 ` Sean Nyekjaer
@ 2021-01-04 11:15 ` Miquel Raynal
2021-01-18 11:07 ` Sean Nyekjaer
0 siblings, 1 reply; 6+ messages in thread
From: Miquel Raynal @ 2021-01-04 11:15 UTC (permalink / raw)
To: Sean Nyekjaer
Cc: Han Xu, Richard Weinberger, Vignesh Raghavendra,
Martin Hundebøll, linux-mtd, linux-kernel, stable
Hi Sean,
Sean Nyekjaer <sean@geanix.com> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
> On 04/01/2021 11.35, Miquel Raynal wrote:
> > On Mon, 2020-12-21 at 10:00:13 UTC, Sean Nyekjaer wrote:
> >> 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@vger.kernel.org
> >> Reported-by: Martin Hundebøll <martin@geanix.com>
> >> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
2021-01-04 11:15 ` Miquel Raynal
@ 2021-01-18 11:07 ` Sean Nyekjaer
2021-01-18 11:09 ` Miquel Raynal
0 siblings, 1 reply; 6+ messages in thread
From: Sean Nyekjaer @ 2021-01-18 11:07 UTC (permalink / raw)
To: Miquel Raynal
Cc: Han Xu, Richard Weinberger, Vignesh Raghavendra,
Martin Hundebøll, linux-mtd, linux-kernel, stable
On 04/01/2021 12.15, Miquel Raynal wrote:
> Hi Sean,
>
> Sean Nyekjaer <sean@geanix.com> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
>
>> On 04/01/2021 11.35, Miquel Raynal wrote:
>>> On Mon, 2020-12-21 at 10:00:13 UTC, Sean Nyekjaer wrote:
>>>> 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@vger.kernel.org
>>>> Reported-by: Martin Hundebøll <martin@geanix.com>
>>>> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
>>> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload
2021-01-18 11:07 ` Sean Nyekjaer
@ 2021-01-18 11:09 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-01-18 11:09 UTC (permalink / raw)
To: Sean Nyekjaer
Cc: Han Xu, Richard Weinberger, Vignesh Raghavendra,
Martin Hundebøll, linux-mtd, linux-kernel, stable
Hi Sean,
Sean Nyekjaer <sean@geanix.com> wrote on Mon, 18 Jan 2021 12:07:01
+0100:
> On 04/01/2021 12.15, Miquel Raynal wrote:
> > Hi Sean,
> >
> > Sean Nyekjaer <sean@geanix.com> wrote on Mon, 4 Jan 2021 11:50:10 +0100:
> >
> >> On 04/01/2021 11.35, Miquel Raynal wrote:
> >>> On Mon, 2020-12-21 at 10:00:13 UTC, Sean Nyekjaer wrote:
> >>>> 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@vger.kernel.org
> >>>> Reported-by: Martin Hundebøll <martin@geanix.com>
> >>>> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> >>> 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
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-18 11:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 10:00 [PATCH] mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload Sean Nyekjaer
2021-01-04 10:35 ` Miquel Raynal
2021-01-04 10:50 ` Sean Nyekjaer
2021-01-04 11:15 ` Miquel Raynal
2021-01-18 11:07 ` Sean Nyekjaer
2021-01-18 11:09 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).