Author: stefanct Date: Sat Apr 26 18:13:09 2014 New Revision: 1780 URL: http://flashrom.org/trac/flashrom/changeset/1780
Log: Report if we are not able to disable AAI mode again.
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at
Modified: trunk/spi25.c
Modified: trunk/spi25.c ============================================================================== --- trunk/spi25.c Sat Apr 26 18:12:55 2014 (r1779) +++ trunk/spi25.c Sat Apr 26 18:13:09 2014 (r1780) @@ -1151,10 +1151,12 @@ programmer_delay(10); }
- /* Use WRDI to exit AAI mode. This needs to be done before issuing any - * other non-AAI command. - */ - spi_write_disable(flash); + /* Use WRDI to exit AAI mode. This needs to be done before issuing any other non-AAI command. */ + result = spi_write_disable(flash); + if (result != 0) { + msg_cerr("%s failed to disable AAI mode.\n", __func__); + return SPI_GENERIC_ERROR; + }
/* Write remaining byte (if any). */ if (pos < start + len) { @@ -1166,6 +1168,8 @@ return 0;
bailout: - spi_write_disable(flash); + result = spi_write_disable(flash); + if (result != 0) + msg_cerr("%s failed to disable AAI mode.\n", __func__); return SPI_GENERIC_ERROR; }