Lines Matching refs:sg
98 static int msb_sg_compare_to_buffer(struct scatterlist *sg, in msb_sg_compare_to_buffer() argument
104 sg_miter_start(&miter, sg, sg_nents(sg), in msb_sg_compare_to_buffer()
344 struct scatterlist sg[2]; in h_msb_read_page() local
434 sg_init_table(sg, ARRAY_SIZE(sg)); in h_msb_read_page()
435 msb_sg_copy(msb->current_sg, sg, ARRAY_SIZE(sg), in h_msb_read_page()
439 memstick_init_req_sg(mrq, MS_TPC_READ_LONG_DATA, sg); in h_msb_read_page()
480 struct scatterlist sg[2]; in h_msb_write_block() local
559 sg_init_table(sg, ARRAY_SIZE(sg)); in h_msb_write_block()
561 if (msb_sg_copy(msb->current_sg, sg, ARRAY_SIZE(sg), in h_msb_write_block()
566 memstick_init_req_sg(mrq, MS_TPC_WRITE_LONG_DATA, sg); in h_msb_write_block()
860 struct scatterlist *sg, int offset) in msb_read_page() argument
872 sg_miter_start(&miter, sg, sg_nents(sg), in msb_read_page()
911 msb->current_sg = sg; in msb_read_page()
979 struct scatterlist sg; in msb_verify_block() local
982 sg_init_one(&sg, msb->block_buffer, msb->block_size); in msb_verify_block()
987 NULL, &sg, page * msb->page_size); in msb_verify_block()
1001 u16 pba, u32 lba, struct scatterlist *sg, int offset) in msb_write_block() argument
1004 BUG_ON(sg->length < msb->page_size); in msb_write_block()
1045 msb->current_sg = sg; in msb_write_block()
1059 error = msb_verify_block(msb, pba, sg, offset); in msb_write_block()
1116 struct scatterlist *sg, int offset) in msb_update_block() argument
1141 error = msb_write_block(msb, new_pba, lba, sg, offset); in msb_update_block()
1193 struct scatterlist sg; in msb_read_boot_blocks() local
1216 sg_init_one(&sg, page, sizeof(*page)); in msb_read_boot_blocks()
1217 if (msb_read_page(msb, pba, 0, &extra, &sg, 0)) { in msb_read_boot_blocks()
1255 struct scatterlist sg; in msb_read_bad_block_table() local
1289 sg_init_one(&sg, buffer, size_to_read); in msb_read_bad_block_table()
1292 error = msb_read_page(msb, pba, page, NULL, &sg, offset); in msb_read_bad_block_table()
1531 struct scatterlist sg; in msb_cache_flush() local
1548 sg_init_one(&sg, msb->cache , msb->block_size); in msb_cache_flush()
1560 error = msb_read_page(msb, pba, page, &extra, &sg, offset); in msb_cache_flush()
1581 error = msb_update_block(msb, msb->cache_block_lba, &sg, 0); in msb_cache_flush()
1603 int page, bool add_to_cache_only, struct scatterlist *sg, int offset) in msb_cache_write() argument
1634 msb_sg_copy(sg, sg_tmp, ARRAY_SIZE(sg_tmp), offset, msb->page_size); in msb_cache_write()
1644 int page, struct scatterlist *sg, int offset) in msb_cache_read() argument
1657 msb_sg_copy(sg, sg_tmp, ARRAY_SIZE(sg_tmp), in msb_cache_read()
1666 error = msb_read_page(msb, pba, page, NULL, sg, offset); in msb_cache_read()
1670 msb_cache_write(msb, lba, page, true, sg, offset); in msb_cache_read()
1806 int page, struct scatterlist *sg, size_t len, int *sucessfuly_written) in msb_do_write_request() argument
1819 error = msb_update_block(msb, lba, sg, offset); in msb_do_write_request()
1829 error = msb_cache_write(msb, lba, page, false, sg, offset); in msb_do_write_request()
1846 int page, struct scatterlist *sg, int len, int *sucessfuly_read) in msb_do_read_request() argument
1854 error = msb_cache_read(msb, lba, page, sg, offset); in msb_do_read_request()
1876 struct scatterlist *sg = msb->prealloc_sg; in msb_io_work() local
1907 blk_rq_map_sg(msb->queue, msb->req, sg); in msb_io_work()
1915 error = msb_do_read_request(msb, lba, page, sg, in msb_io_work()
1918 error = msb_do_write_request(msb, lba, page, sg, in msb_io_work()