Lines Matching refs:ec

166 static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec);
173 #define paranoid_check_ec(ubi, pnum, ec) 0
197 if (e->ec < e1->ec)
199 else if (e->ec > e1->ec)
313 if (e->ec < e1->ec)
315 else if (e->ec > e1->ec)
347 dbg_wl("added PEB %d EC %d to the protection queue", e->pnum, e->ec);
365 max = e->ec + diff;
372 if (e1->ec >= max)
437 if (last->ec - first->ec < WL_FREE_MAX_DIFF)
461 dbg_wl("PEB %d EC %d", e->pnum, e->ec);
513 unsigned long long ec = e->ec;
515 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec);
517 err = paranoid_check_ec(ubi, e->pnum, e->ec);
529 ec += err;
530 if (ec > UBI_MAX_ERASECOUNTER) {
536 e->pnum, ec);
541 dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec);
543 ec_hdr->ec = cpu_to_be64(ec);
549 e->ec = ec;
551 if (e->ec > ubi->max_ec)
552 ubi->max_ec = e->ec;
582 e->pnum, e->ec);
641 e->pnum, e->ec, torture);
712 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD)) {
714 e1->ec, e2->ec);
720 e1->pnum, e1->ec, e2->pnum, e2->ec);
979 if (!(e2->ec - e1->ec >= UBI_WL_THRESHOLD))
1024 dbg_wl("cancel erasure of PEB %d EC %d", pnum, e->ec);
1030 dbg_wl("erase PEB %d EC %d", pnum, e->ec);
1465 e->ec = seb->ec;
1481 e->ec = seb->ec;
1482 ubi_assert(e->ec >= 0);
1496 e->ec = seb->ec;
1500 e->pnum, e->ec);
1504 e->pnum, e->ec);
1576 * @ec: the erase counter to check
1579 * is equivalent to @ec, and a negative error code if not or if an error
1582 static int paranoid_check_ec(struct ubi_device *ubi, int pnum, int ec)
1602 read_ec = be64_to_cpu(ec_hdr->ec);
1603 if (ec != read_ec) {
1605 ubi_err("read EC is %lld, should be %d", read_ec, ec);
1636 e->pnum, e->ec, root);
1664 e->pnum, e->ec);