Lines Matching refs:sgl
495 struct ubi_sgl *sgl, int lnum, int offset, int len, in ubi_eba_read_leb_sg() argument
503 ubi_assert(sgl->list_pos < UBI_MAX_SG_COUNT); in ubi_eba_read_leb_sg()
504 sg = &sgl->sg[sgl->list_pos]; in ubi_eba_read_leb_sg()
505 if (len < sg->length - sgl->page_pos) in ubi_eba_read_leb_sg()
508 to_read = sg->length - sgl->page_pos; in ubi_eba_read_leb_sg()
511 sg_virt(sg) + sgl->page_pos, offset, in ubi_eba_read_leb_sg()
519 sgl->page_pos += to_read; in ubi_eba_read_leb_sg()
520 if (sgl->page_pos == sg->length) { in ubi_eba_read_leb_sg()
521 sgl->list_pos++; in ubi_eba_read_leb_sg()
522 sgl->page_pos = 0; in ubi_eba_read_leb_sg()
528 sgl->list_pos++; in ubi_eba_read_leb_sg()
529 sgl->page_pos = 0; in ubi_eba_read_leb_sg()