diff options
| author | 2026-09-04 19:05:37 -0600 | |
|---|---|---|
| committer | 2026-09-09 09:54:01 +0200 | |
| commit | a3c84084a73e170374b7dd493947efdef4ee57bc (patch) | |
| tree | e842dec68aaeb7fa87eddaa36a039db31aea58d0 /scripts/Makefile.thinlto | |
| parent | mtd: rawnand: lpc32xx_mlc: Remove platform data support (diff) | |
mtd: rawnand: sunxi: reject ECC maximization on small pages
When nand-ecc-maximize is set, the driver selects a 1024-byte ECC step
and divides the available OOB bytes by the resulting number of steps. A
NAND with a smaller page therefore produces zero steps and a division by
zero.
The older controllers also provide a 512-byte ECC block mode, but the
hardware documentation describes that as an ECC block size within NAND
pages whose supported sizes start at 1024 bytes. It does not document a
512-byte NAND page mode.
Reject pages smaller than 1024 bytes before deriving the step count. This
prevents the division by zero at the point where the incompatible
maximized geometry is selected without changing explicitly configured
512-byte ECC block handling.
Fixes: 4796d8655915 ("mtd: nand: sunxi: Support ECC maximization")
Cc: stable@vger.kernel.org
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
