mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
mtd: Update fail_addr when erase fails due to bad blocks
For all other erase failures, the fail_addr is updated with the failing address. Only in the case of erase failure due to bad block detection, the fail_addr is not updated. This change simply updates the fail_addr for this specific scenario so that it is consistent with the rest of the code. Signed-off-by: Farhan Ali <farhan.ali@broadcom.com>
This commit is contained in:
parent
bedab97a21
commit
c146de4872
1 changed files with 2 additions and 0 deletions
|
@ -3559,6 +3559,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
|
|||
pr_warn("%s: attempt to erase a bad block at page 0x%08x\n",
|
||||
__func__, page);
|
||||
instr->state = MTD_ERASE_FAILED;
|
||||
instr->fail_addr =
|
||||
((loff_t)page << chip->page_shift);
|
||||
goto erase_exit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue