Lines Matching refs:sgl
492 struct ubi_sgl *sgl, int lnum, int offset, int len, in ubi_eba_read_leb_sg() argument
500 ubi_assert(sgl->list_pos < UBI_MAX_SG_COUNT); in ubi_eba_read_leb_sg()
501 sg = &sgl->sg[sgl->list_pos]; in ubi_eba_read_leb_sg()
502 if (len < sg->length - sgl->page_pos) in ubi_eba_read_leb_sg()
505 to_read = sg->length - sgl->page_pos; in ubi_eba_read_leb_sg()
508 sg_virt(sg) + sgl->page_pos, offset, in ubi_eba_read_leb_sg()
516 sgl->page_pos += to_read; in ubi_eba_read_leb_sg()
517 if (sgl->page_pos == sg->length) { in ubi_eba_read_leb_sg()
518 sgl->list_pos++; in ubi_eba_read_leb_sg()
519 sgl->page_pos = 0; in ubi_eba_read_leb_sg()
525 sgl->list_pos++; in ubi_eba_read_leb_sg()
526 sgl->page_pos = 0; in ubi_eba_read_leb_sg()