[PATCH v2] mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init()

Miquel Raynal miquel.raynal at bootlin.com
Tue Oct 18 01:17:19 PDT 2022


On Fri, 2022-09-23 at 09:34:41 UTC, Mika Westerberg wrote:
> The Intel SPI-NOR controller does not support the 4-byte address opcode
> so ->set_4byte_addr_mode() ends up returning -ENOTSUPP and the SPI flash
> chip probe fail like this:
> 
>   [ 12.291082] spi-nor: probe of spi0.0 failed with error -524
> 
> Whereas previously before commit 08412e72afba ("mtd: spi-nor: core:
> Return error code from set_4byte_addr_mode()") it worked just fine.
> 
> Fix this by ignoring -ENOTSUPP in spi_nor_init().
> 
> Fixes: 08412e72afba ("mtd: spi-nor: core: Return error code from set_4byte_addr_mode()")
> Cc: stable at vger.kernel.org
> Reported-by: Hongyu Ning <hongyu.ning at intel.com>
> Signed-off-by: Mika Westerberg <mika.westerberg at linux.intel.com>
> Reviewed-by: Michael Walle <michael at walle.cc>
> Acked-by: Tudor Ambarus <tudor.ambarus at microchip.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel



More information about the linux-mtd mailing list