mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
UBI: init eba tables before wl when attaching a device
This fixes that u-boot gets stuck when a bitflip was detected
during "ubi part <ubi_device>". If a bitflip was detected UBI tries
to copy the PEB to a different place. This needs that the eba table
are initialized, but this was done after the wear levelling worker
detects the bitflip. So changes the initialisation of these two
tasks in u-boot.
This is a u-boot specific patch and not needed in the linux layer,
because due to commit 1b1f9a9d00
UBI: Ensure that "background thread" operations are really executed
we schedule these tasks in place and not as in linux after the inital
task which schedule this new task is finished.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
349a8d5e56
commit
d63894654d
1 changed files with 6 additions and 6 deletions
|
@ -476,21 +476,21 @@ static int attach_by_scanning(struct ubi_device *ubi)
|
|||
if (err)
|
||||
goto out_si;
|
||||
|
||||
err = ubi_wl_init_scan(ubi, si);
|
||||
if (err)
|
||||
goto out_vtbl;
|
||||
|
||||
err = ubi_eba_init_scan(ubi, si);
|
||||
if (err)
|
||||
goto out_wl;
|
||||
|
||||
err = ubi_wl_init_scan(ubi, si);
|
||||
if (err)
|
||||
goto out_vtbl;
|
||||
|
||||
ubi_scan_destroy_si(si);
|
||||
return 0;
|
||||
|
||||
out_wl:
|
||||
ubi_wl_close(ubi);
|
||||
out_vtbl:
|
||||
vfree(ubi->vtbl);
|
||||
out_wl:
|
||||
ubi_wl_close(ubi);
|
||||
out_si:
|
||||
ubi_scan_destroy_si(si);
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue