Home
last modified time | relevance | path

Searched refs:lnum (Results 1 – 14 of 14) sorted by relevance

/drivers/mtd/ubi/
Deba.c107 void ubi_eba_get_ldesc(struct ubi_volume *vol, int lnum, in ubi_eba_get_ldesc() argument
110 ldesc->lnum = lnum; in ubi_eba_get_ldesc()
111 ldesc->pnum = vol->eba_tbl->entries[lnum].pnum; in ubi_eba_get_ldesc()
211 int lnum) in ltree_lookup() argument
226 if (lnum < le->lnum) in ltree_lookup()
228 else if (lnum > le->lnum) in ltree_lookup()
250 int vol_id, int lnum) in ltree_add_entry() argument
261 le->lnum = lnum; in ltree_add_entry()
264 le1 = ltree_lookup(ubi, vol_id, lnum); in ltree_add_entry()
292 ubi_assert(lnum != le1->lnum); in ltree_add_entry()
[all …]
Dkapi.c368 static int leb_read_sanity_check(struct ubi_volume_desc *desc, int lnum, in leb_read_sanity_check() argument
375 if (vol_id < 0 || vol_id >= ubi->vtbl_slots || lnum < 0 || in leb_read_sanity_check()
376 lnum >= vol->used_ebs || offset < 0 || len < 0 || in leb_read_sanity_check()
384 if (lnum == vol->used_ebs - 1 && in leb_read_sanity_check()
422 int ubi_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset, in ubi_leb_read() argument
429 dbg_gen("read %d bytes from LEB %d:%d:%d", len, vol_id, lnum, offset); in ubi_leb_read()
431 err = leb_read_sanity_check(desc, lnum, offset, len); in ubi_leb_read()
438 err = ubi_eba_read_leb(ubi, vol, lnum, buf, offset, len, check); in ubi_leb_read()
462 int ubi_leb_read_sg(struct ubi_volume_desc *desc, int lnum, struct ubi_sgl *sgl, in ubi_leb_read_sg() argument
469 dbg_gen("read %d bytes from LEB %d:%d:%d", len, vol_id, lnum, offset); in ubi_leb_read_sg()
[all …]
Dgluebi.c156 int err = 0, lnum, offs, bytes_left; in gluebi_read() local
160 lnum = div_u64_rem(from, mtd->erasesize, &offs); in gluebi_read()
168 err = ubi_read(gluebi->desc, lnum, buf, offs, to_read); in gluebi_read()
172 lnum += 1; in gluebi_read()
196 int err = 0, lnum, offs, bytes_left; in gluebi_write() local
200 lnum = div_u64_rem(to, mtd->erasesize, &offs); in gluebi_write()
212 err = ubi_leb_write(gluebi->desc, lnum, buf, offs, to_write); in gluebi_write()
216 lnum += 1; in gluebi_write()
236 int err, i, lnum, count; in gluebi_erase() local
242 lnum = mtd_div_by_eb(instr->addr, mtd); in gluebi_erase()
[all …]
Dupd.c174 vol->vol_id, req->lnum, req->bytes); in ubi_start_leb_change()
176 return ubi_eba_atomic_leb_change(ubi, vol, req->lnum, NULL, 0); in ubi_start_leb_change()
181 vol->ch_lnum = req->lnum; in ubi_start_leb_change()
219 static int write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, in write_leb() argument
234 err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len); in write_leb()
246 err = ubi_eba_write_leb_st(ubi, vol, lnum, buf, len, used_ebs); in write_leb()
268 int lnum, offs, err = 0, len, to_write = count; in ubi_more_update_data() local
276 lnum = div_u64_rem(vol->upd_received, vol->usable_leb_size, &offs); in ubi_more_update_data()
309 err = write_leb(ubi, vol, lnum, vol->upd_buf, flush_len, in ubi_more_update_data()
318 lnum += 1; in ubi_more_update_data()
[all …]
Dattach.c190 aeb->lnum = UBI_UNKNOWN; in ubi_alloc_aeb()
230 int lnum, int ec, int to_head, struct list_head *list) in add_to_list() argument
249 aeb->lnum = lnum; in add_to_list()
566 int err, vol_id, lnum; in ubi_add_to_av() local
573 lnum = be32_to_cpu(vid_hdr->lnum); in ubi_add_to_av()
577 pnum, vol_id, lnum, ec, sqnum, bitflips); in ubi_add_to_av()
596 if (lnum != aeb->lnum) { in ubi_add_to_av()
597 if (lnum < aeb->lnum) in ubi_add_to_av()
651 aeb->lnum, aeb->ec, cmp_res & 4, in ubi_add_to_av()
659 aeb->lnum = lnum; in ubi_add_to_av()
[all …]
Dubi.h204 int lnum; member
278 int lnum; member
679 int lnum; member
807 int lnum; member
869 static inline bool ubi_leb_valid(struct ubi_volume *vol, int lnum) in ubi_leb_valid() argument
871 return lnum >= 0 && lnum < vol->reserved_pebs; in ubi_leb_valid()
881 void ubi_eba_get_ldesc(struct ubi_volume *vol, int lnum,
883 bool ubi_eba_is_mapped(struct ubi_volume *vol, int lnum);
885 int lnum);
886 int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
[all …]
Dcdev.c177 int err, lnum, off, len, tbuf_size; in vol_cdev_read() local
209 lnum = div_u64_rem(*offp, vol->usable_leb_size, &off); in vol_cdev_read()
217 err = ubi_eba_read_leb(ubi, vol, lnum, tbuf, off, len, 0); in vol_cdev_read()
223 lnum += 1; in vol_cdev_read()
254 int lnum, off, len, tbuf_size, err = 0; in vol_cdev_direct_write() local
267 lnum = div_u64_rem(*offp, vol->usable_leb_size, &off); in vol_cdev_direct_write()
303 err = ubi_eba_write_leb(ubi, vol, lnum, tbuf, off, len); in vol_cdev_direct_write()
309 lnum += 1; in vol_cdev_direct_write()
448 if (!ubi_leb_valid(vol, req.lnum) || in vol_cdev_ioctl()
465 int32_t lnum; in vol_cdev_ioctl() local
[all …]
Dwl.c584 int vol_id, int lnum, int torture, bool nested) in schedule_erase() argument
600 wl_wrk->lnum = lnum; in schedule_erase()
621 int vol_id, int lnum, int torture) in do_sync_erase() argument
629 wl_wrk.lnum = lnum; in do_sync_erase()
651 int erase = 0, keep = 0, vol_id = -1, lnum = -1; local
816 lnum = be32_to_cpu(vid_hdr->lnum);
875 e1->pnum, vol_id, lnum, e2->pnum);
887 err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
903 e2->pnum, vol_id, lnum);
904 err = do_sync_erase(ubi, e2, vol_id, lnum, 0);
[all …]
Dfastmap.c145 aeb->lnum = -1; in add_aeb()
214 if (aeb->lnum != tmp_aeb->lnum) { in assign_aeb_to_av()
215 if (aeb->lnum < tmp_aeb->lnum) in assign_aeb_to_av()
254 if (be32_to_cpu(new_vh->lnum) != aeb->lnum) { in update_vol()
255 if (be32_to_cpu(new_vh->lnum) < aeb->lnum) in update_vol()
268 ubi_assert(aeb->lnum == new_aeb->lnum); in update_vol()
286 if (av->highest_lnum == be32_to_cpu(new_vh->lnum)) in update_vol()
291 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
303 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
311 if (av->highest_lnum <= be32_to_cpu(new_vh->lnum)) { in update_vol()
[all …]
Dfastmap-wl.c364 int lnum, int torture) in ubi_wl_put_fm_peb() argument
389 vol_id = lnum ? UBI_FM_DATA_VOLUME_ID : UBI_FM_SB_VOLUME_ID; in ubi_wl_put_fm_peb()
390 return schedule_erase(ubi, e, vol_id, lnum, torture, true); in ubi_wl_put_fm_peb()
Dvtbl.c313 vid_hdr->lnum = cpu_to_be32(copy); in create_vtbl()
400 leb[aeb->lnum] = vzalloc(ubi->vtbl_size); in process_lvol()
401 if (!leb[aeb->lnum]) { in process_lvol()
406 err = ubi_io_read_data(ubi, leb[aeb->lnum], aeb->pnum, 0, in process_lvol()
Dio.c845 int lnum = be32_to_cpu(vid_hdr->lnum); in validate_vid_hdr() local
858 if (vol_id < 0 || lnum < 0 || data_size < 0 || used_ebs < 0 || in validate_vid_hdr()
911 if (lnum < used_ebs - 1) { in validate_vid_hdr()
916 } else if (lnum > used_ebs - 1) { in validate_vid_hdr()
Dubi-media.h275 __be32 lnum; member
Ddebug.c79 pr_err("\tlnum %d\n", be32_to_cpu(vid_hdr->lnum)); in ubi_dump_vid_hdr()
183 pr_err("\tlnum %d\n", aeb->lnum); in ubi_dump_aeb()