lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251121-w25q01jv_fixup-v1-1-3d175050db73@nvidia.com>
Date: Fri, 21 Nov 2025 14:35:34 -0800
From: Marc Olberding <molberding@...dia.com>
To: Tudor Ambarus <tudor.ambarus@...aro.org>, 
 Pratyush Yadav <pratyush@...nel.org>, Michael Walle <mwalle@...nel.org>, 
 Miquel Raynal <miquel.raynal@...tlin.com>, 
 Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 Marc Olberding <molberding@...dia.com>
Subject: [PATCH] mtd: spi-nor: Fix w25q01jv flags

The previous support for w25q01jv was causing read/write
miscompares on flashing with the aspeed ast2600. Add in
extra flags to allow the chip to identify as having 4K
sectors if the sfdp tables aren't present, as well
as reporting the name and adding the LOCK and TB flag.

After this change, no miscompares were seen.

Fixes: 9b4db032fb2b ("mtd: spi-nor: winbond: Add support for w25q01jv")
Signed-off-by: Marc Olberding <molberding@...dia.com>
---
The initial commit[1] that came in for w25q01jv [2] support
lacks the 4K sector flags in the case that the sfdp flags don't
exist on the chip. This caused filesystem corruption upon writes.
Add in the flags as well as the chips size and name.

Testing:
After this patch, BMC's backed by the w25q01jv succeed on boot
as well as self-flash

[1] https://lore.kernel.org/all/20251014050108.665338-1-chou.cosmo@gmail.com/
[2] https://www.winbond.com/resource-files/W25Q01JV%20SPI%20RevE%2003042024%20Plus.pdf
---
 drivers/mtd/spi-nor/winbond.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 63a93c9eb9174b073e19c41eeada33b23a99b184..7d4119afc8c6b4135b5a055b52b1ade7e3ef926c 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -227,8 +227,11 @@ static const struct flash_info winbond_nor_parts[] = {
 		.size = SZ_64M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	}, {
-		/* W25Q01JV */
 		.id = SNOR_ID(0xef, 0x40, 0x21),
+		.name = "w25q01jv",
+		.size = SZ_128M,
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+		.no_sfdp_flags = SECT_4K,
 		.fixups = &winbond_nor_multi_die_fixups,
 	}, {
 		.id = SNOR_ID(0xef, 0x50, 0x12),

---
base-commit: fd95357fd8c6778ac7dea6c57a19b8b182b6e91f
change-id: 20251121-w25q01jv_fixup-468539f2a777

Best regards,
-- 
Marc Olberding <molberding@...dia.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ