[PATCH v3 0/3] mtd: maps: vmu-flash: Fix build and runtime errors

Florian Fuchs posted 3 patches 6 days, 16 hours ago
drivers/mtd/maps/vmu-flash.c | 7 ++++---
include/linux/maple.h        | 3 +--
2 files changed, 5 insertions(+), 5 deletions(-)
[PATCH v3 0/3] mtd: maps: vmu-flash: Fix build and runtime errors
Posted by Florian Fuchs 6 days, 16 hours ago
Hi all,

This small series fixes build and runtime errors in the vmu-flash driver
(enabled by CONFIG_MTD_VMU) and the related maple.h. These changes were
verified on real Dreamcast hardware with a physical VMU. The VMU can now
be successfully probed, read and written with MTD tools like mtdinfo and
mtd_debug. Previously, the driver failed to build or crashed during
probing.

        bash-5.3# mtdinfo /dev/mtd0
        mtd0
        Name:                           vmu2.1.0
        Type:                           mlc-nand
        Eraseblock size:                512 bytes
        Amount of eraseblocks:          256 (131072 bytes, 128.0 KiB)
        Minimum input/output unit size: 512 bytes
        Sub-page size:                  512 bytes
        Character device major/minor:   90:0
        Bad blocks are allowed:         true
        Device is writable:             true

Thanks,
Florian
---
v2->v3: Add Fixes tag to respective patches, fix subject to previous
        commits
v1->v2: Rebased patches and fixed the hotplug issues in other sh
        patches.

v2: https://lore.kernel.org/lkml/20260427114750.2480900-1-fuchsfl@gmail.com/
v1: https://lore.kernel.org/lkml/20251117224408.498449-1-fuchsfl@gmail.com/

The original v1 was postponed until the hotplug issue and other runtime
panics were fixed by the following patch:
"[PATCH v3] sh: maple: fix empty port handling":
https://lore.kernel.org/linux-sh/20260515181115.3244161-1-fuchsfl@gmail.com/

Using VMUs while some ports are empty requires the above patch.

Florian Fuchs (3):
  maple: fix build error due to missing include of linux/device.h
  mtd: maps: vmu-flash: fix fault in unaligned fixup
  mtd: maps: vmu-flash: fix NULL pointer dereference in initialization

 drivers/mtd/maps/vmu-flash.c | 7 ++++---
 include/linux/maple.h        | 3 +--
 2 files changed, 5 insertions(+), 5 deletions(-)


base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.43.0
Re: [PATCH v3 0/3] mtd: maps: vmu-flash: Fix build and runtime errors
Posted by Miquel Raynal 6 days, 16 hours ago
Hi Florian,

On 18/05/2026 at 13:45:18 +02, Florian Fuchs <fuchsfl@gmail.com> wrote:

> Hi all,
>
> This small series fixes build and runtime errors in the vmu-flash driver
> (enabled by CONFIG_MTD_VMU) and the related maple.h. These changes were
> verified on real Dreamcast hardware with a physical VMU. The VMU can now
> be successfully probed, read and written with MTD tools like mtdinfo and
> mtd_debug. Previously, the driver failed to build or crashed during
> probing.
>
>         bash-5.3# mtdinfo /dev/mtd0
>         mtd0
>         Name:                           vmu2.1.0
>         Type:                           mlc-nand
>         Eraseblock size:                512 bytes
>         Amount of eraseblocks:          256 (131072 bytes, 128.0 KiB)
>         Minimum input/output unit size: 512 bytes
>         Sub-page size:                  512 bytes
>         Character device major/minor:   90:0
>         Bad blocks are allowed:         true
>         Device is writable:             true
>
> Thanks,
> Florian
> ---

I believe there is no issue in applying patches 2 and 3 on top of the
mtd tree and let whoever is responsible take patch 1. If I get an ack I
can also carry patch 1 through the mtd tree. Without more feedback I
plan on applying patches 2 and 3 in the coming weeks.

Thanks,
Miquèl