Lines Matching refs:pnum

138 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec);
168 ubi_assert(e->pnum != e1->pnum); in wl_tree_add()
169 if (e->pnum < e1->pnum) in wl_tree_add()
190 ubi->lookuptbl[e->pnum] = NULL; in wl_entry_destroy()
259 if (e->pnum == e1->pnum) { in in_wl_tree()
269 ubi_assert(e->pnum != e1->pnum); in in_wl_tree()
270 if (e->pnum < e1->pnum) in in_wl_tree()
298 dbg_wl("added PEB %d EC %d to the protection queue", e->pnum, e->ec); in prot_queue_add()
338 !ubi->fm && e->pnum < UBI_FM_MAX_START) in find_wl_entry()
400 dbg_wl("PEB %d EC %d", e->pnum, e->ec); in wl_get_wle()
413 static int prot_queue_del(struct ubi_device *ubi, int pnum) in prot_queue_del() argument
417 e = ubi->lookuptbl[pnum]; in prot_queue_del()
425 dbg_wl("deleted PEB %d from the protection queue", e->pnum); in prot_queue_del()
445 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec); in sync_erase()
447 err = self_check_ec(ubi, e->pnum, e->ec); in sync_erase()
455 err = ubi_io_sync_erase(ubi, e->pnum, torture); in sync_erase()
466 e->pnum, ec); in sync_erase()
471 dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec); in sync_erase()
475 err = ubi_io_write_ec_hdr(ubi, e->pnum, ec_hdr); in sync_erase()
512 e->pnum, e->ec); in serve_prot_queue()
590 e->pnum, e->ec, torture); in schedule_erase()
621 dbg_wl("sync erase of PEB %i", e->pnum); in do_sync_erase()
698 dbg_wl("anchor-move PEB %d to PEB %d", e1->pnum, e2->pnum);
725 e1->pnum, e1->ec, e2->pnum, e2->ec);
736 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
754 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vid_hdr, 0);
767 dbg_wl("PEB %d has no VID header", e1->pnum);
777 e1->pnum);
783 err, e1->pnum);
790 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vid_hdr);
843 e1->pnum, vol_id, lnum, e2->pnum);
868 e2->pnum, vol_id, lnum);
886 e1->pnum, vol_id, lnum, e2->pnum, err);
889 e1->pnum, e2->pnum, err);
916 err, e1->pnum, e2->pnum);
919 err, e1->pnum, vol_id, lnum, e2->pnum);
1028 int pnum = e->pnum; local
1034 pnum, e->ec, wl_wrk->vol_id, wl_wrk->lnum);
1054 ubi_err(ubi, "failed to erase PEB %d, error %d", pnum, err);
1082 ubi_err(ubi, "bad physical eraseblock %d detected", pnum);
1098 ubi_msg(ubi, "mark PEB %d as bad", pnum);
1099 err = ubi_io_mark_bad(ubi, pnum);
1147 dbg_wl("cancel erasure of PEB %d EC %d", e->pnum, e->ec);
1172 int pnum, int torture) argument
1177 dbg_wl("PEB %d", pnum);
1178 ubi_assert(pnum >= 0);
1179 ubi_assert(pnum < ubi->peb_count);
1185 e = ubi->lookuptbl[pnum];
1192 dbg_wl("PEB %d is being moved, wait", pnum);
1209 dbg_wl("PEB %d is the target of data moving", pnum);
1230 err = prot_queue_del(ubi, e->pnum);
1232 ubi_err(ubi, "PEB %d not found", pnum);
1263 int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum) argument
1267 ubi_msg(ubi, "schedule PEB %d for scrubbing", pnum);
1271 e = ubi->lookuptbl[pnum];
1286 dbg_wl("the PEB %d is not in proper tree, retry", pnum);
1297 err = prot_queue_del(ubi, e->pnum);
1299 ubi_err(ubi, "PEB %d not found", pnum);
1529 e->pnum = aeb->pnum;
1531 ubi->lookuptbl[e->pnum] = e;
1548 e->pnum = aeb->pnum;
1555 ubi->lookuptbl[e->pnum] = e;
1568 e->pnum = aeb->pnum;
1570 ubi->lookuptbl[e->pnum] = e;
1574 e->pnum, e->ec);
1578 e->pnum, e->ec);
1594 ubi->lookuptbl[e->pnum] = e;
1675 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec) argument
1688 err = ubi_io_read_ec_hdr(ubi, pnum, ec_hdr, 0);
1697 ubi_err(ubi, "self-check failed for PEB %d", pnum);
1728 e->pnum, e->ec, root);
1756 e->pnum, e->ec);
1839 err = ubi_self_check_all_ff(ubi, e->pnum, ubi->vid_hdr_aloffset,
1842 ubi_err(ubi, "new PEB %d does not contain all 0xFF bytes", e->pnum);
1846 return e->pnum;