mtd: rawnand: Ensure all continuous terms are always in sync
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 23 Feb 2024 11:55:45 +0000 (12:55 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 14 Mar 2024 23:04:50 +0000 (00:04 +0100)
commit6fb075fca63c3486612986eeff84ed4179644038
tree84bfe399e22fa9db94b20f11ebeefd790e7cda2d
parentdf9803bf5a91e3599f12b53c94722f2c4e144a86
mtd: rawnand: Ensure all continuous terms are always in sync

While crossing a LUN boundary, it is probably safer (and clearer) to
keep all members of the continuous read structure aligned, including the
pause page (which is the last page of the lun or the last page of the
continuous read). Once these members properly in sync, we can use the
rawnand_cap_cont_reads() helper everywhere to "prepare" the next
continuous read if there is one.

Fixes: bbcd80f53a5e ("mtd: rawnand: Prevent crossing LUN boundaries during sequential reads")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223115545.354541-4-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nand_base.c