Lines Matching refs:ec

119 		       int lnum, int ec, int to_head, struct list_head *list)  in add_to_list()  argument
124 dbg_bld("add to free: PEB %d, EC %d", pnum, ec); in add_to_list()
126 dbg_bld("add to erase: PEB %d, EC %d", pnum, ec); in add_to_list()
128 dbg_bld("add to alien: PEB %d, EC %d", pnum, ec); in add_to_list()
140 aeb->ec = ec; in add_to_list()
159 static int add_corrupted(struct ubi_attach_info *ai, int pnum, int ec) in add_corrupted() argument
163 dbg_bld("add to corrupted: PEB %d, EC %d", pnum, ec); in add_corrupted()
171 aeb->ec = ec; in add_corrupted()
449 int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips) in ubi_add_to_av() argument
462 pnum, vol_id, lnum, ec, sqnum, bitflips); in ubi_add_to_av()
495 aeb->pnum, aeb->sqnum, aeb->ec); in ubi_add_to_av()
536 aeb->lnum, aeb->ec, cmp_res & 4, in ubi_add_to_av()
541 aeb->ec = ec; in ubi_add_to_av()
559 return add_to_list(ai, pnum, vol_id, lnum, ec, in ubi_add_to_av()
577 aeb->ec = ec; in ubi_add_to_av()
662 const struct ubi_attach_info *ai, int pnum, int ec) in early_erase_peb() argument
667 if ((long long)ec >= UBI_MAX_ERASECOUNTER) { in early_erase_peb()
673 pnum, ec); in early_erase_peb()
681 ec_hdr->ec = cpu_to_be64(ec); in early_erase_peb()
717 dbg_bld("return free PEB %d, EC %d", aeb->pnum, aeb->ec); in ubi_early_get_peb()
728 if (aeb->ec == UBI_UNKNOWN) in ubi_early_get_peb()
729 aeb->ec = ai->mean_ec; in ubi_early_get_peb()
731 err = early_erase_peb(ubi, ai, aeb->pnum, aeb->ec+1); in ubi_early_get_peb()
735 aeb->ec += 1; in ubi_early_get_peb()
737 dbg_bld("return PEB %d, EC %d", aeb->pnum, aeb->ec); in ubi_early_get_peb()
821 long long uninitialized_var(ec); in scan_peb()
860 ec = UBI_UNKNOWN; in scan_peb()
879 ec = be64_to_cpu(ech->ec); in scan_peb()
880 if (ec > UBI_MAX_ERASECOUNTER) { in scan_peb()
963 UBI_UNKNOWN, ec, 1, &ai->erase); in scan_peb()
966 err = add_corrupted(ai, pnum, ec); in scan_peb()
972 ec, 1, &ai->erase); in scan_peb()
979 UBI_UNKNOWN, ec, 1, &ai->erase); in scan_peb()
982 UBI_UNKNOWN, ec, 0, &ai->free); in scan_peb()
1009 ec, 1, &ai->erase); in scan_peb()
1024 ec, 0, &ai->alien); in scan_peb()
1039 err = ubi_add_to_av(ubi, ai, pnum, ec, vidh, bitflips); in scan_peb()
1045 ai->ec_sum += ec; in scan_peb()
1047 if (ec > ai->max_ec) in scan_peb()
1048 ai->max_ec = ec; in scan_peb()
1049 if (ec < ai->min_ec) in scan_peb()
1050 ai->min_ec = ec; in scan_peb()
1269 if (aeb->ec == UBI_UNKNOWN) in scan_all()
1270 aeb->ec = ai->mean_ec; in scan_all()
1274 if (aeb->ec == UBI_UNKNOWN) in scan_all()
1275 aeb->ec = ai->mean_ec; in scan_all()
1279 if (aeb->ec == UBI_UNKNOWN) in scan_all()
1280 aeb->ec = ai->mean_ec; in scan_all()
1283 if (aeb->ec == UBI_UNKNOWN) in scan_all()
1284 aeb->ec = ai->mean_ec; in scan_all()
1566 if (aeb->pnum < 0 || aeb->ec < 0) { in self_check_ai()
1571 if (aeb->ec < ai->min_ec) { in self_check_ai()
1573 ai->min_ec, aeb->ec); in self_check_ai()
1577 if (aeb->ec > ai->max_ec) { in self_check_ai()
1579 ai->max_ec, aeb->ec); in self_check_ai()