Revert "mtd: spi-nor: core: Return error code from set_4byte_addr_mode()"
Subsystems (2)
PATCH 1/1 Revert "mtd: spi-nor: core: Return error code from set_4byte_addr_mode()"
This reverts commit 08412e72afba3a2daef3e7f3378c3753255a0017.
The Intel SPI-NOR controller does not support this opcode so the driver ends up returning -EOPNOTSUPP and that makes the SPI flash chip probe fail like this:
[ 12.291082] spi-nor: probe of spi0.0 failed with error -524
Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
--- drivers/mtd/spi-nor/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/core.c +1 -1
@@ -2724,7 +2724,7 @@ static int spi_nor_init(struct spi_nor *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); + nor->params->set_4byte_addr_mode (nor, true); }return 0 ;
Signature · 6 lines
2.35.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Am 2022-09-22 15:48, schrieb Mika Westerberg:
Quoted 10 lines
This reverts commit
08412e72afba3a2daef3e7f3378c3753255a0017.The Intel SPI-NOR controller does not support this opcode so the driver ends up returning
-EOPNOTSUPPand that makes the SPI flash chip probe fail like this:[ 12.291082] spi-nor: probe of spi0.0 failed with error -524Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
Can't we just ignore that return code then?
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 7 lines · Michael Walle
Am 2022-09-22 15:48, schrieb Mika Westerberg:
Quoted 6 lines
This reverts commit
08412e72afba3a2daef3e7f3378c3753255a0017.The Intel SPI-NOR controller does not support this opcode so the driver ends up returning
-EOPNOTSUPPand that makes the SPI flash chip probe fail like this:
Quoted 6 lines
Quoted 4 lines
[ 12.291082] spi-nor: probe of spi0.0 failed with error -524Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
Can't we just ignore that return code then?
Isn't this revert just doing that? ;-)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Am 2022-09-22 16:16, schrieb Mika Westerberg:
Quoted 8 lines · Michael Walle
Quoted 7 lines
Am 2022-09-22 15:48, schrieb Mika Westerberg:
Quoted 6 lines
This reverts commit
08412e72afba3a2daef3e7f3378c3753255a0017.The Intel SPI-NOR controller does not support this opcode so the driver ends up returning
-EOPNOTSUPPand that makes the SPI flash chip probe fail like this:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
[ 12.291082] spi-nor: probe of spi0.0 failed with error -524Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
Can't we just ignore that return code then?
Isn't this revert just doing that? ;-)
No? It also ignores other (valid) errors.
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 11 lines · Michael Walle
Am 2022-09-22 16:16, schrieb Mika Westerberg:
Quoted 10 lines · Michael Walle
Quoted 9 lines
Am 2022-09-22 15:48, schrieb Mika Westerberg:
Quoted 8 lines
This reverts commit
08412e72afba3a2daef3e7f3378c3753255a0017.The Intel SPI-NOR controller does not support this opcode so the driver ends up returning
-EOPNOTSUPPand that makes the SPI flash chip probe fail like this:[ 12.291082] spi-nor: probe of spi0.0 failed with error -524
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
Can't we just ignore that return code then?
Isn't this revert just doing that? ;-)
No? It also ignores other (valid) errors.
Okay, I will do that and ignore just -ENOTSUPP in v2.
However, there is also similar call in spi_nor_restore() where the error also gets ignored so I wonder if it was originally intentional.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Am 2022-09-22 16:29, schrieb Mika Westerberg:
Quoted 17 lines · Michael Walle
Quoted 16 lines
Am 2022-09-22 16:16, schrieb Mika Westerberg:
Quoted 15 lines · Michael Walle
Quoted 13 lines
Am 2022-09-22 15:48, schrieb Mika Westerberg:
Quoted 10 lines
This reverts commit
08412e72afba3a2daef3e7f3378c3753255a0017.The Intel SPI-NOR controller does not support this opcode so the driver ends up returning
-EOPNOTSUPPand that makes the SPI flash chip probe fail like this:[ 12.291082] spi-nor: probe of spi0.0 failed with error -524Whereas previously it worked just fine (and hence the return value probably was ignored in the first place).
Can't we just ignore that return code then?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Isn't this revert just doing that? ;-)
No? It also ignores other (valid) errors.
Okay, I will do that and ignore just
-ENOTSUPPin v2.However, there is also similar call in
spi_nor_restore()where the error also gets ignored so I wonder if it was originally intentional.
Yes that was intentional, because spi_nor_restore() returns void.
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/