linux-stable/drivers/mtd/spi-nor
Mika Westerberg d08884b010 mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init()
commit 69d04ca999 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 08412e72af ("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: 08412e72af ("mtd: spi-nor: core: Return error code from set_4byte_addr_mode()")
Cc: stable@vger.kernel.org
Reported-by: Hongyu Ning <hongyu.ning@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220923093441.3178-1-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-04 00:00:19 +09:00
..
controllers mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
atmel.c mtd: spi-nor: atmel: unify function names 2022-02-25 09:44:31 +02:00
catalyst.c mtd: spi-nor: catalyst: unify function names 2022-02-25 09:44:31 +02:00
core.c mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init() 2022-11-04 00:00:19 +09:00
core.h mtd: spi-nor: core: Track flash's internal address mode 2022-07-28 05:14:28 +03:00
debugfs.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
eon.c mtd: spi-nor: support eon en25qh256a variant 2022-05-09 16:58:24 +05:30
esmt.c mtd: spi-nor: esmt: Use correct name of f25l32qa 2022-07-19 13:05:31 +03:00
everspin.c mtd: spi-nor: everspin: unify function names 2022-02-25 09:44:31 +02:00
fujitsu.c mtd: spi-nor: fujitsu: unify function names 2022-02-25 09:44:31 +02:00
gigadevice.c mtd: spi-nor: gigadevice: unify function names 2022-02-25 09:44:31 +02:00
intel.c mtd: spi-nor: intel: unify function names 2022-02-25 09:44:31 +02:00
issi.c mtd: spi-nor: Do not change nor->addr_nbytes at SFDP parsing time 2022-07-28 05:11:56 +03:00
Kconfig mtd: spi-nor: keep lock bits if they are non-volatile 2020-12-07 23:01:15 +05:30
macronix.c mtd: spi-nor: macronix: unify function names 2022-02-25 09:44:31 +02:00
Makefile mtd: spi-nor: expose internal parameters via debugfs 2022-05-09 16:55:22 +05:30
micron-st.c mtd: spi-nor: micron-st: Skip FSR reading if SPI controller does not support it 2022-07-19 12:20:23 +03:00
otp.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
sfdp.c mtd: spi-nor: core: Track flash's internal address mode 2022-07-28 05:14:28 +03:00
sfdp.h mtd: spi-nor: Get rid of duplicated argument in spi_nor_parse_sfdp() 2021-03-15 18:01:47 +02:00
spansion.c mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups 2022-07-28 05:19:27 +03:00
sst.c mtd: spi-nor: sst: unify function names 2022-02-25 09:44:32 +02:00
swp.c mtd: spi-nor: Introduce spi_nor_set_mtd_info() 2021-12-07 17:05:10 +02:00
sysfs.c mtd: spi-nor: add initial sysfs support 2021-06-15 23:18:32 +05:30
winbond.c mtd: spi-nor: winbond: add support for W25Q512NW-IM 2022-05-09 16:56:20 +05:30
xilinx.c mtd: spi-nor: s/addr_width/addr_nbytes 2022-07-28 05:11:56 +03:00
xmc.c mtd: spi-nor: xmc: unify function names 2022-02-25 09:44:32 +02:00