]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: Fix and simplify again the continuous read derivations
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 23 Feb 2024 11:55:43 +0000 (12:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:35 +0000 (15:28 +0200)
commit26a4eee38f8c0616476f5aa6a264b0b94a354506
tree182ba6f3f6e9d60d32ef63da38e17855745f7035
parentda2911798f25d46b36f8839e0071f2256f728763
mtd: rawnand: Fix and simplify again the continuous read derivations

[ Upstream commit c7ee7c8d4b60fe46d4861b1200bc1c7ab657960a ]

We need to avoid the first page if we don't read it entirely.
We need to avoid the last page if we don't read it entirely.
While rather simple, this logic has been failed in the previous
fix. This time I wrote about 30 unit tests locally to check each
possible condition, hopefully I covered them all.

Reported-by: Christophe Kerello <christophe.kerello@foss.st.com>
Closes: https://lore.kernel.org/linux-mtd/20240221175327.42f7076d@xps-13/T/#m399bacb10db8f58f6b1f0149a1df867ec086bb0a
Suggested-by: Christophe Kerello <christophe.kerello@foss.st.com>
Fixes: 828f6df1bcba ("mtd: rawnand: Clarify conditions to enable continuous reads")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Christophe Kerello <christophe.kerello@foss.st.com>
Link: https://lore.kernel.org/linux-mtd/20240223115545.354541-2-miquel.raynal@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/nand_base.c