Skip to content

mtd: block2mtd: wait for device enumeration, add name support

Rodrigo Freire linux-mtd lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 9 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mtd: block2mtd: Ensure that block2mtd is triggered after block devices are presented.drivers/mtd/devices/block2mtd.c+42 -141 reply
2/3mtd: block2mtd: Adds a mtd name and a block device timeout optiondrivers/mtd/devices/block2mtd.c+22 -91 reply
3/3mtd: block2mtd: Removes PAGE_MASK as a index to partition sizedrivers/mtd/devices/block2mtd.c+1 -27 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] mtd: block2mtd: wait for device enumeration, add name support

From: Felix Fietkau <[email protected]>

mtd: block2mtd: wait for device enumeration, add name support

Currently, a block MTD device is not presented timely on boot time, in order to start mounting the filesystems, causing the system to not boot or panic because of lack of rootfs. This patch ensures that block2mtd is presented at the right time, so the filesystems can be mounted on boot time.
This issue was seen on BCM2835 (Raspberry Pi) systems when mounting JFFS2 block2mtd filesystems.
This patchset also adds a MTD device name and a timeout option to the driver and deprecates PAGE_MASK when calculating the device size. Original patchset:
https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/440-block2mtd_init.patch?rev=40444
https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/441-block2mtd_probe.patch?rev=40444

V3: Split the changes on 3 different patches, fixes a compile warning
V2: Uses kstrdup, removed PAGE_MASK.

 drivers/mtd/devices/block2mtd.c |   57 ++++++++++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 15 deletions(-)
 drivers/mtd/devices/block2mtd.c |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)
 drivers/mtd/devices/block2mtd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

---
1.7.1