• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/mtd/ubi/

Lines Matching refs:pnum

69  * @pnum: physical eraseblock number
77 int pnum;
82 * @rb_pnum: link in the @wl->prot.pnum RB-tree
110 * storing the protected physical eraseblocks: @wl->prot.pnum and
120 * o the WL movement is temporarily prohibited (@wl->prot.pnum and
157 static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec);
161 #define paranoid_check_ec(ubi, pnum, ec) 0
203 ubi_assert(e->pnum != e1->pnum);
204 if (e->pnum < e1->pnum)
340 if (e->pnum == e1->pnum) {
350 ubi_assert(e->pnum != e1->pnum);
351 if (e->pnum < e1->pnum)
380 p = &ubi->prot.pnum.rb_node;
385 if (e->pnum < pe1->e->pnum)
391 rb_insert_color(&pe->rb_pnum, &ubi->prot.pnum);
537 dbg_wl("PEB %d EC %d, protection %d", e->pnum, e->ec, protect);
540 return e->pnum;
546 * @pnum: the physical eraseblock to remove
548 static void prot_tree_del(struct ubi_device *ubi, int pnum)
553 p = ubi->prot.pnum.rb_node;
558 if (pnum == pe->e->pnum)
561 if (pnum < pe->e->pnum)
567 ubi_assert(pe->e->pnum == pnum);
569 rb_erase(&pe->rb_pnum, &ubi->prot.pnum);
588 dbg_wl("erase PEB %d, old EC %llu", e->pnum, ec);
590 err = paranoid_check_ec(ubi, e->pnum, e->ec);
598 err = ubi_io_sync_erase(ubi, e->pnum, torture);
609 e->pnum, ec);
614 dbg_wl("erased PEB %d, new EC %llu", e->pnum, ec);
618 err = ubi_io_write_ec_hdr(ubi, e->pnum, ec_hdr);
667 pe->e->pnum, ubi->abs_ec, pe->abs_ec);
669 rb_erase(&pe->rb_pnum, &ubi->prot.pnum);
715 e->pnum, e->ec, torture);
803 e1->pnum, e1->ec, e2->pnum, e2->ec);
808 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
819 * Now we are going to copy physical eraseblock @e1->pnum to @e2->pnum.
825 err = ubi_io_read_vid_hdr(ubi, e1->pnum, vid_hdr, 0);
836 dbg_wl("PEB %d has no VID header", e1->pnum);
840 err, e1->pnum);
847 err = ubi_eba_copy_leb(ubi, e1->pnum, e2->pnum, vid_hdr);
870 dbg_wl("PEB %d was put meanwhile, erase", e2->pnum);
912 dbg_wl("PEB %d was put meanwhile, erase", e1->pnum);
1011 int pnum = e->pnum;
1014 dbg_wl("cancel erasure of PEB %d EC %d", pnum, e->ec);
1020 dbg_wl("erase PEB %d EC %d", pnum, e->ec);
1059 ubi_err("bad physical eraseblock %d detected", pnum);
1084 ubi_msg("mark PEB %d as bad", pnum);
1086 err = ubi_io_mark_bad(ubi, pnum);
1109 * @pnum: physical eraseblock to return
1112 * This function is called to return physical eraseblock @pnum to the pool of
1114 * occurred to this @pnum and it has to be tested. This function returns zero
1117 int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture)
1122 dbg_wl("PEB %d", pnum);
1123 ubi_assert(pnum >= 0);
1124 ubi_assert(pnum < ubi->peb_count);
1128 e = ubi->lookuptbl[pnum];
1135 dbg_wl("PEB %d is being moved", pnum);
1147 dbg_wl("PEB %d is the target of data moving", pnum);
1158 prot_tree_del(ubi, e->pnum);
1175 * @pnum: the physical eraseblock to schedule
1182 int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum)
1186 ubi_msg("schedule PEB %d for scrubbing", pnum);
1190 e = ubi->lookuptbl[pnum];
1204 dbg_wl("the PEB %d is not in proper tree, retry", pnum);
1212 prot_tree_del(ubi, pnum);
1375 ubi->prot.pnum = ubi->prot.aec = RB_ROOT;
1410 e->pnum = seb->pnum;
1412 ubi->lookuptbl[e->pnum] = e;
1426 e->pnum = seb->pnum;
1430 ubi->lookuptbl[e->pnum] = e;
1440 e->pnum = seb->pnum;
1442 ubi->lookuptbl[e->pnum] = e;
1457 e->pnum = seb->pnum;
1459 ubi->lookuptbl[e->pnum] = e;
1462 e->pnum, e->ec);
1466 e->pnum, e->ec);
1558 * @pnum: the physical eraseblock number to check
1561 * This function returns zero if the erase counter of physical eraseblock @pnum
1565 static int paranoid_check_ec(const struct ubi_device *ubi, int pnum, int ec)
1575 err = ubi_io_read_ec_hdr(ubi, pnum, ec_hdr, 0);
1584 ubi_err("paranoid check failed for PEB %d", pnum);
1612 e->pnum, e->ec, root);