From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEE5C35AC30 for ; Mon, 18 May 2026 11:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779104832; cv=none; b=mP5gWy4v7IoWtS2ruVwufYLjDkwxho89WSUH6j5r71GUP0fzeRSRClXE51y1bU7kyEfBJjQGs0V7SZ4JlaJ4piAfqwiIVAN/lUeqoimcc+cMN+HO+v1x7gDkE/ZUk20UFP9epwkxYHA9EEpY/C/64v9gvcIPiNMDI2DQbywCd6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779104832; c=relaxed/simple; bh=youasXlMRX9ful6QDGAzpUrQ9X92iBZf9ThkyrDCVjM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KnoI2E7XOe0b2S2RuhCqWn6ybhfs2eQ64gmCpD+4J/0qsYq4Fz9w2CMvD68IqZi/nDEp8aP17mX9QQzXiPDsZ3HzpQ9rWnI807oiSGTLf/zUWs4qgtSx/7LDDXkKSVjMZiCpW7v2Fycgxgkz24bHh/RFaQzaVkGsXDCYGE0zWms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=qvd3Flxm; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qvd3Flxm" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-48e8132c6d0so13311845e9.1 for ; Mon, 18 May 2026 04:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779104829; x=1779709629; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=HP1FkQP3upUXw27uw6hA2g2czB6GYP9RbzsbFRYmzIQ=; b=qvd3FlxmKmYpnDsB8SP4FymgVwHw54GhRCok9iHeFZzfOP8T3xaigVjywKcD+MdC6Q ehDJPMFMEYQSi3A2S/pb2WOh79MbDYvMIyY1zHSTIZSH4xEakTm5yNWiOwUEIhA8g1Gb 7jCtDgBScxY0lO3K9gVf0/DzNcbBTGaw+kX70Q7jt1DPvvk3rl8r3piKbptjF+RGC2F+ fH70d40ET0Nxbh7o9FiaRuMPlIKoBzRTnFxdRKjd+62pzv4plJ5klietqYQYtcMeuOQN 3tIFx2nkUmQSj5Ed5Vd+x4jbwH3aS6Hfkf2Gy0s0AVijKxNhrkU0jgQ0E6Ly7S7XsV0s 1v5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779104829; x=1779709629; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HP1FkQP3upUXw27uw6hA2g2czB6GYP9RbzsbFRYmzIQ=; b=FKZRqMX+iDlnrE9RH40Dv1pgfwEGMOgMaUDwo93fuAE4Fvu5t4l1czCiQrwyY+yC3L AXXJZgV9r71rlCrlmfstTQ2zujpbCQMDdBi4JzD3XqrpQpN7+/lU5OWbUKaA22UFnwmz K+XcjcL4nVHxLIUu2+qSRAeNuJpeuqCAdmRImmVIrI0btEoSalDp8d7+NTu2U3A9W08d b1Q7++0/XPmG+UrV8PkwdCF8TRRLByz6qdleLsXZEECa6feaCcFMdmY43B+fS2q00VYH RIKhkVqg58sZSMz80icsn12c4jLu8W3FVFjUzrlvFWyR9Ce4N2pKUIPN+lCO8AtFmmnZ fMFQ== X-Forwarded-Encrypted: i=1; AFNElJ+1usFTR5RILlCc0a5uVYO8+JcTKEDrFj0FEtNTWuUs9TeqM2OmyMtjk1O4/6bH+8CSLTjL3LG01AUKRz0=@vger.kernel.org X-Gm-Message-State: AOJu0YxV4WvuVfyjSoTKUE+vsVRXoPKIZjMxt15jbcA+3CzySbqx9bM4 KCffcRqKa3QyPGH067HFfkW9LbQWsdjUN3ZQxOMes362JEHUKtHN2SU= X-Gm-Gg: Acq92OFfMa5vEklQ4+gnPRvTw4DSBHOAGnvKX9OS/TuRQNCsIkIL3aNZRBWhs2TA5FT UPLHpLpfkNH9mXX4vxYVsClETqJ2xNfMGUq0fLYpimLS/WiRy5Fj0vt36Z6HSWk4Yx9eZNPxdyk 6Os0e2D6C5ylgCZN7iGX/RJAo+gJ6a81W9twJFP+YYnklesNc2nrMXqQvQI3318Bl8NeHftuUzn NtwoP7BZZJAce851PhRWM3JmcOu758WidhC2ZSnxn2AShM9Pjg4mxSvMA16Ib0z5OAvu6CFleww rxbC6LDCG0wcfKeFyPCbfK7wgWXL6MT6FYA6j1TJLfPByoW1n8yFE5PTK5dCOGhTeTbaoqBtd1g RNKS2DFMNohWZZSylTEhJqU0cVYY7eMkfcXeK63VeReZ1mY/RaVFuzXTG9TSc+OVwoZrxczSoIW EjE8y0+k2aaTvtSD+YYbpZ5G0FCB2jV/I6AYhsJ+8hsZBsu4z1QLxwCKhOx7N5JAuFvoGf2H7Ux a9S0Ejo X-Received: by 2002:a05:600c:3f0f:b0:48f:99a9:bbcc with SMTP id 5b1f17b1804b1-48fe60ecb9cmr207456935e9.10.1779104829093; Mon, 18 May 2026 04:47:09 -0700 (PDT) Received: from localhost ([2a02:810d:4a94:b300:f15c:fd38:3fe1:9653]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-45d9e767d0bsm35203411f8f.3.2026.05.18.04.47.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2026 04:47:08 -0700 (PDT) From: Florian Fuchs To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Rich Felker , John Paul Adrian Glaubitz , Adrian McMenamin , Florian Fuchs , Artur Rojek Subject: [PATCH v3 0/3] mtd: maps: vmu-flash: Fix build and runtime errors Date: Mon, 18 May 2026 13:45:18 +0200 Message-ID: <20260518114521.81564-1-fuchsfl@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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