This is a note to let you know that I've just added the patch titled mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init() to the 6.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-spi-nor-core-ignore-enotsupp-in-spi_nor_init.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 69d04ca999499bccb6ca849fa2bfc5e6448f7233 Mon Sep 17 00:00:00 2001 From: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> Date: Fri, 23 Sep 2022 12:34:41 +0300 Subject: mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init() From: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> commit 69d04ca999499bccb6ca849fa2bfc5e6448f7233 upstream. 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@xxxxxxxxxxxxxxx Reported-by: Hongyu Ning <hongyu.ning@xxxxxxxxx> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> Reviewed-by: Michael Walle <michael@xxxxxxxx> Acked-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Link: https://lore.kernel.org/linux-mtd/20220923093441.3178-1-mika.westerberg@xxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mtd/spi-nor/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2724,7 +2724,9 @@ static int spi_nor_init(struct spi_nor * */ WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET, "enabling reset hack; may not recover from unexpected reboots\n"); - return nor->params->set_4byte_addr_mode(nor, true); + err = nor->params->set_4byte_addr_mode(nor, true); + if (err && err != -ENOTSUPP) + return err; } return 0; Patches currently in stable-queue which might be from mika.westerberg@xxxxxxxxxxxxxxx are queue-6.0/mtd-spi-nor-core-ignore-enotsupp-in-spi_nor_init.patch