[PATCH v3] mtd: spi-nor: micron-st: Add support for is25wx01g
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Oct 13 09:14:18 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] mtd: spi-nor: ISSI flash sysfs manufacturer incorrectly exposed as micron
--
commit 1e03ade777f97b0b05ae670b65caa00dab47917b
Author: Nuno Sá <nuno.sa at analog.com>
mtd: spi-nor: micron-st: Add support for is25wx01g
Add support for the ISSI IS25WX01G, a 1 Gbit (128 MiB) octal NOR flash.
The part is fully described by SFDP, so only the flash ID and a small
post_bfpt fixup are needed.
> diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> index f97f2dead8c2f..eba07efdca753 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c
> @@ -216,9 +216,34 @@ static const struct flash_info micron_nor_parts[] = {
> .size = SZ_256M,
> .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ,
> .mfr_flags = USE_FSR,
> + }, {
> + /* is25wx01g */
> + .id = SNOR_ID(0x9d, 0x5b, 0x1b),
> + .sector_size = SZ_128K,
> + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP |
> + SPI_NOR_BP3_SR_BIT6,
> + .mfr_flags = USE_FSR,
> },
> };
[Severity: Medium]
Will this incorrectly expose the ISSI flash manufacturer as "micron" in sysfs?
By placing the ISSI chip inside the micron_nor_parts[] array, it looks like its
manufacturer identity will be hardcoded to Micron.
When spi_nor_match_id() matches the ID, it unconditionally links the sysfs
manufacturer string to the array the chip resides in:
drivers/mtd/spi-nor/core.c:spi_nor_match_id() {
...
if (part->id &&
!memcmp(part->id->bytes, id, part->id->len)) {
nor->manufacturer = manufacturers[i];
return part;
}
...
}
Could this break sysfs ABI expectations for identifying the chip's true
manufacturer? This also seems to contradict the test output in the patch
notes which shows the manufacturer sysfs attribute returning "issi".
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-mtd-spi-nor-new-issi-chip-v3-1-099c58673142@analog.com?part=1
More information about the linux-mtd
mailing list