Skip to content
Commit 7e439681 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

mtd: Fix partition alignment check on multi-erasesize devices

Commit 1eeef2d7

 ("mtd: handle partitioning on devices with 0
erasesize") introduced a regression on heterogeneous erase region
devices. Alignment of the partition was tested against the master
eraseblock size which can be bigger than the slave one, thus leading
to some partitions being marked as read-only.

Update wr_alignment to match this slave erasesize after this erasesize
has been determined by picking the biggest erasesize of all the regions
embedded in the MTD partition.

Reported-by: default avatarMathias Thore <Mathias.Thore@infinera.com>
Fixes: 1eeef2d7

 ("mtd: handle partitioning on devices with 0 erasesize")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: default avatarMathias Thore <Mathias.Thore@infinera.com>
Reviewed-by: default avatarMathias Thore <Mathias.Thore@infinera.com>
parent 73600b61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment