From nobody Sat Feb 7 15:40:20 2026 Received: from pdx-out-008.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-008.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.42.203.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 063D9335070 for ; Thu, 29 Jan 2026 22:16:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.42.203.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769724975; cv=none; b=VrHOGRqYQAJJdgNK9VMiHHyIIO7zq9Woz7ShuBEKus9GRNPKjbkt46iFZCbGnYom8+KuNagterExHUiRrpUIXP4cx8o2qIlCfkyVfHNCyFgfJkcYTHvwwCRyCP8khX6L/RPrROcyXRBG8aD8YRb+oioEUpHkA1pahTDm3Wwo+70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769724975; c=relaxed/simple; bh=hspGHPTfJf8VkijIa/j0k4IuDawPmQYB7U6/+rZaUB4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Gdq23+HGxsD5AGxLMPthAe4cZw4rbcH3TQYVxBRWA+KMK3y6Tox1zbjaAe57KrQojD4+Do0RRywzriGBnUrRVVmgHiFgo+mpudk8CBAAwp5754OiGYcI3KDC6JMmWX8cjZqk5xI/dXh/l+N2PWFOIoZWQsW3hEMidR4g+gNYBt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=PmVOx0xP; arc=none smtp.client-ip=52.42.203.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="PmVOx0xP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1769724974; x=1801260974; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hWdvUWW0Ad9qhyIEDQ11OCPpgS4C9PUnHfqSA+NtbDU=; b=PmVOx0xPQPrasb3iRoBqBltK/A0yVIQ+zw74lj5NR/izc2u0DYMtvO0A vHioY3n18mG0wVBxmWWNWMCNLZeRv3G+Xc9hVNCF4Tdb4uE+CUFEQ7wDk NXRY83d1sz8vtJDtQVdPT98VfZRFmxcRMuhtloMXXerWkVhIMQJgNv+wH xVpD+S76P+46BUjK9PBbQ5e0ShXqL0FZyjT4BsYeLmCoMwB5ERWLJxy2M bihm25nGMUCR+/KXAo/zHrq8hr4LQzJG9gMYQTaYLgH9wVCLEdQUMWjZ7 miTb+Iwvkcq6t4Lcb3WJJ+spnyTf20PWXYMQMIDsHDeTpJXJyRUZiSagt w==; X-CSE-ConnectionGUID: U46w1vRmQVOJAD4cbTOGMg== X-CSE-MsgGUID: 8kpImQZ0ROO3naXyL9pmLw== X-IronPort-AV: E=Sophos;i="6.21,261,1763424000"; d="scan'208";a="11871847" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-008.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2026 22:16:13 +0000 Received: from EX19MTAUWC002.ant.amazon.com [205.251.233.51:4250] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.45.176:2525] with esmtp (Farcaster) id 7a772041-cd17-4e57-9f7d-f39ae12f9983; Thu, 29 Jan 2026 22:16:13 +0000 (UTC) X-Farcaster-Flow-ID: 7a772041-cd17-4e57-9f7d-f39ae12f9983 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Thu, 29 Jan 2026 22:16:13 +0000 Received: from 842f574e803f.amazon.com (10.187.171.32) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Thu, 29 Jan 2026 22:16:12 +0000 From: David LaPorte To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Martin Kurbanov , Mikhail Kshevetskiy , Cheng Ming Lin , Pratyush Yadav , , CC: David LaPorte , Gunnar Kudrjavets Subject: [PATCH] mtd: spinand: Disable continuous read during probe Date: Thu, 29 Jan 2026 14:15:59 -0800 Message-ID: <20260129221606.35158-1-dalaport@amazon.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EX19D041UWA003.ant.amazon.com (10.13.139.105) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Content-Type: text/plain; charset="utf-8" Macronix serial NAND devices with continuous read support do not clear the configuration register on soft reset and lack a hardware reset pin. When continuous read is interrupted (e.g., during reboot), the feature remains enabled at the device level. With continuous read enabled, the OOB area becomes inaccessible and all reads are instead directed to the main area. As a result, during partition allocation as part of MTD device registration, the first two bytes of the main area for the master block are read and indicate that the block is bad. This process repeats for every subsequent block for the partition. All reads and writes that reference the BBT find no good blocks and fail. The only paths for recovery from this state are triggering the continuous read feature by way of raw MTD reads or through a NAND device power drain. Disable continuous read explicitly during spinand probe to ensure quiescent feature state. Fixes: 631cfdd0520d ("mtd: spi-nand: Add continuous read support") Signed-off-by: David LaPorte Reviewed-by: Gunnar Kudrjavets --- Testing details: - Instrumented feature enablement and verified fix with affected Macronix serial NAND device: warm reboot without patch marks all blocks bad during partition allocation; with patch applied, device registers cleanly with no bad blocks marked - Patch cherry-picks cleanly to mainline v6.19-rc6 and builds without warnings - Boot tested mainline + patch on aarch64 host without SPI interface --- drivers/mtd/nand/spi/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index d207286572d8..1fb05ac8678b 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -859,6 +859,7 @@ static void spinand_cont_read_init(struct spinand_devic= e *spinand) (engine_type =3D=3D NAND_ECC_ENGINE_TYPE_ON_DIE || engine_type =3D=3D NAND_ECC_ENGINE_TYPE_NONE)) { spinand->cont_read_possible =3D true; + spinand_cont_read_enable(spinand, false); } } -- 2.43.0