Re: [PATCH v2] mtd: spi-nor: core: Check read CR support

From: Pratyush Yadav
Date: Tue Nov 18 2025 - 07:35:41 EST


On Fri, Sep 19 2025, Jakub Czapiga wrote:

> Some SPI controllers like Intel's one on the PCI bus do not support
> opcode 35h. This opcode is used to read the Configuration Register on
> SPI-NOR chips that have 16-bit Status Register configured regardless
> of the controller support for it. Adding a check call in the setup step
> allows disabling use of the 35h opcode and falling back to the manual
> Status Registers management.
>
> Before:
> openat(AT_FDCWD, "/dev/mtd0", O_RDWR) = 4
> ioctl(4, MIXER_WRITE(6) or MEMUNLOCK, {start=0, length=0x2000000}) = -1
> EOPNOTSUPP
>
> After:
> openat(AT_FDCWD, "/dev/mtd0", O_RDWR) = 4
> ioctl(4, MIXER_WRITE(6) or MEMUNLOCK, {start=0, length=0x2000000}) = 0
> ioctl(4, MIXER_WRITE(5) or MEMLOCK, {start=0x1800000, length=0x800000}) = 0
>
> Suggested-by: Adeel Arshad <adeel.arshad@xxxxxxxxx>
> Signed-off-by: Jakub Czapiga <czapiga@xxxxxxxxxx>

Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>

Applied to spi-nor/next. Thanks!

BTW, b4 complains that DKIM fails on your email. Please check.

[...]

--
Regards,
Pratyush Yadav