]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/ubi/vtbl.c
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx
[u-boot] / drivers / mtd / ubi / vtbl.c
index 9264ac68e8901837d4ab9f5d84f76ec93b48b747..3fbb4a0a9d40b2884b77962d21d05d22f7be799c 100644 (file)
@@ -2,19 +2,7 @@
  * Copyright (c) International Business Machines Corp., 2006
  * Copyright (c) Nokia Corporation, 2006, 2007
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  *
  * Author: Artem Bityutskiy (Битюцкий Артём)
  */
@@ -388,7 +376,7 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
 
                err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0,
                                       ubi->vtbl_size);
-               if (err == UBI_IO_BITFLIPS || err == -EBADMSG)
+               if (err == UBI_IO_BITFLIPS || mtd_is_eccerr(err))
                        /*
                         * Scrub the PEB later. Note, -EBADMSG indicates an
                         * uncorrectable ECC error, but we have our own CRC and
@@ -520,6 +508,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
                vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs);
                vol->alignment = be32_to_cpu(vtbl[i].alignment);
                vol->data_pad = be32_to_cpu(vtbl[i].data_pad);
+               vol->upd_marker = vtbl[i].upd_marker;
                vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ?
                                        UBI_DYNAMIC_VOLUME : UBI_STATIC_VOLUME;
                vol->name_len = be16_to_cpu(vtbl[i].name_len);