• Home
  • Raw
  • Download

Lines Matching refs:pnum

125 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec);
155 ubi_assert(e->pnum != e1->pnum); in wl_tree_add()
156 if (e->pnum < e1->pnum) in wl_tree_add()
177 ubi->lookuptbl[e->pnum] = NULL; in wl_entry_destroy()
246 if (e->pnum == e1->pnum) { in in_wl_tree()
256 ubi_assert(e->pnum != e1->pnum); in in_wl_tree()
257 if (e->pnum < e1->pnum) in in_wl_tree()
306 dbg_wl("added PEB %d EC %d to the protection queue", e->pnum, e->ec); in prot_queue_add()
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()
624 dbg_wl("sync erase of PEB %i", e->pnum); in do_sync_erase()
713 dbg_wl("anchor-move PEB %d to PEB %d", e1->pnum, e2->pnum);
741 e1->pnum, e1->ec, e2->pnum, e2->ec);
752 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
770 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vidb, 0);
784 dbg_wl("PEB %d has no VID header", e1->pnum);
794 e1->pnum);
804 e1->pnum);
810 err, e1->pnum);
817 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vidb);
874 e1->pnum, vol_id, lnum, e2->pnum);
899 e2->pnum, vol_id, lnum);
918 e1->pnum, vol_id, lnum, e2->pnum, err);
921 e1->pnum, e2->pnum, err);
964 err, e1->pnum, e2->pnum);
967 err, e1->pnum, vol_id, lnum, e2->pnum);
1077 int pnum = e->pnum; local
1083 pnum, e->ec, wl_wrk->vol_id, wl_wrk->lnum);
1090 e->pnum < UBI_FM_MAX_START) {
1114 ubi_err(ubi, "failed to erase PEB %d, error %d", pnum, err);
1142 ubi_err(ubi, "bad physical eraseblock %d detected", pnum);
1158 ubi_msg(ubi, "mark PEB %d as bad", pnum);
1159 err = ubi_io_mark_bad(ubi, pnum);
1207 dbg_wl("cancel erasure of PEB %d EC %d", e->pnum, e->ec);
1232 int pnum, int torture) argument
1237 dbg_wl("PEB %d", pnum);
1238 ubi_assert(pnum >= 0);
1239 ubi_assert(pnum < ubi->peb_count);
1245 e = ubi->lookuptbl[pnum];
1252 dbg_wl("PEB %d is being moved, wait", pnum);
1269 dbg_wl("PEB %d is the target of data moving", pnum);
1290 err = prot_queue_del(ubi, e->pnum);
1292 ubi_err(ubi, "PEB %d not found", pnum);
1323 int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum) argument
1327 ubi_msg(ubi, "schedule PEB %d for scrubbing", pnum);
1331 e = ubi->lookuptbl[pnum];
1346 dbg_wl("the PEB %d is not in proper tree, retry", pnum);
1357 err = prot_queue_del(ubi, e->pnum);
1359 ubi_err(ubi, "PEB %d not found", pnum);
1472 int ubi_bitflip_check(struct ubi_device *ubi, int pnum, int force) argument
1477 if (pnum < 0 || pnum >= ubi->peb_count) {
1493 e = ubi->lookuptbl[pnum];
1512 err = ubi_io_read(ubi, ubi->peb_buf, pnum, 0, ubi->peb_size);
1526 e = ubi->lookuptbl[pnum];
1543 prot_queue_del(ubi, e->pnum);
1718 e->pnum = aeb->pnum;
1720 ubi->lookuptbl[e->pnum] = e;
1797 e->pnum = aeb->pnum;
1804 ubi->lookuptbl[e->pnum] = e;
1819 e->pnum = aeb->pnum;
1821 ubi->lookuptbl[e->pnum] = e;
1825 e->pnum, e->ec);
1829 e->pnum, e->ec);
1840 e = ubi_find_fm_block(ubi, aeb->pnum);
1843 ubi_assert(!ubi->lookuptbl[e->pnum]);
1844 ubi->lookuptbl[e->pnum] = e;
1854 if (ubi->lookuptbl[aeb->pnum])
1960 static int self_check_ec(struct ubi_device *ubi, int pnum, int ec) argument
1973 err = ubi_io_read_ec_hdr(ubi, pnum, ec_hdr, 0);
1982 ubi_err(ubi, "self-check failed for PEB %d", pnum);
2013 e->pnum, e->ec, root);
2036 e->pnum, e->ec);
2119 err = ubi_self_check_all_ff(ubi, e->pnum, ubi->vid_hdr_aloffset,
2122 ubi_err(ubi, "new PEB %d does not contain all 0xFF bytes", e->pnum);
2126 return e->pnum;