sf: fix stmicro offset setup while erasing
Subsystems (2)
PATCH 1/1 sf: fix stmicro offset setup while erasing
Reported-by Peter Gombos <[email protected]>
Signed-off-by Mike Frysinger <[email protected]>
--- drivers/mtd/spi/stmicro.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mtd/spi/stmicro.c +2 -1
@@ -281,7 +281,8 @@ int stmicro_erase(struct spi_flash *flash, u32 offset, size_t len) ret =0 ;for (actual =0 ; actual < len; actual++) { - cmd[1 ] = (offset / sector_size) + actual; + cmd[1 ] = offset >>16 ; + offset += sector_size; ret =spi_flash_cmd (flash->spi,CMD_M25PXX_WREN ,NULL ,0 );if (ret <0 ) {
Signature · 1 line
1.6.5
Wolfgang Denk
AppliedPATCH 1/1 sf: fix stmicro offset setup while erasing
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Reported-by Peter Gombos <[email protected]>Signed-off-by Mike Frysinger <[email protected]>--- drivers/mtd/spi/stmicro.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Never underestimate the power of human stupidity when it comes to using technology they don't understand.