]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mtd: rawnand: arasan: Prevent an unsupported configuration
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 8 Oct 2021 16:36:40 +0000 (18:36 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:33 +0000 (09:48 +0100)
commit72c197ae3408522dccc71a2e41db9a12733e9621
tree589fd01f88130c2ba826ed3d21894c1742cfc38e
parentfe384f2cdb2c6657eef74eea42f96464f4a34d7b
mtd: rawnand: arasan: Prevent an unsupported configuration

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit fc9e18f9e987ad46722dad53adab1c12148c213c ]

Under the following conditions:
* after rounding up by 4 the number of bytes to transfer (this is
  related to the controller's internal constraints),
* if this (rounded) amount of data is situated beyond the end of the
  device,
* and only in NV-DDR mode,
the Arasan NAND controller timeouts.

This currently can happen in a particular helper used when picking
software ECC algorithms. Let's prevent this situation by refusing to use
the NV-DDR interface with software engines.

Fixes: 4edde6031458 ("mtd: rawnand: arasan: Support NV-DDR interface")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211008163640.1753821-1-miquel.raynal@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/mtd/nand/raw/arasan-nand-controller.c